:root {
    --ink: #101827;
    --muted: #5b6472;
    --line: #dfe5ee;
    --soft: #f4f7fb;
    --panel: #ffffff;
    --navy: #101827;
    --orange: #f97316;
    --orange-dark: #d65f0d;
    --green: #16a34a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--ink);
    background: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
}

.site-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-shell.narrow {
    width: min(820px, calc(100% - 32px));
}

.site-header {
    background: var(--navy);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-shell,
.footer-shell {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.site-nav a {
    color: #e5e7eb;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
}

.language-switch a {
    color: #d8dee8;
    text-decoration: none;
    min-width: 34px;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.language-switch a:hover,
.language-switch a.active {
    background: var(--orange);
    color: #ffffff;
}

.hero {
    background: var(--navy);
    color: #ffffff;
    padding: 76px 0 64px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 36px;
    align-items: center;
}

.hero h1,
.page-hero h1 {
    margin: 8px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1;
}

.hero p {
    max-width: 760px;
    color: #d8dee8;
    font-size: 17px;
}

.hero-subtitle {
    font-size: 23px;
    color: #ffffff;
    font-weight: 700;
}

.eyebrow {
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid transparent;
}

.btn.primary {
    background: var(--orange);
    color: #ffffff;
}

.btn.primary:hover {
    background: var(--orange-dark);
}

.btn.secondary {
    background: #ffffff;
    color: var(--navy);
    border-color: var(--line);
}

.btn.disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: default;
}

.btn.full {
    width: 100%;
    margin-top: 12px;
}

.hero-panel {
    display: grid;
    gap: 14px;
}

.stat-card,
.product-card,
.download-panel,
.note-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 28px rgba(16, 24, 39, 0.08);
}

.hero-panel .stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.stat-card span {
    display: block;
    color: #9aa4b2;
    font-size: 13px;
    font-weight: 700;
}

.hero-panel .stat-card span {
    color: #cbd5e1;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 28px;
}

.stat-card small {
    display: block;
    color: #d8dee8;
    margin-top: 4px;
}

.stat-card.accent strong {
    color: #fdba74;
}

.section {
    padding: 68px 0;
}

.section.soft,
.page-hero {
    background: var(--soft);
}

.section h2,
.page-hero h1,
.software-main h2 {
    margin: 8px 0 14px;
}

.section h2,
.software-main h2 {
    font-size: 34px;
    line-height: 1.15;
}

.section-heading {
    margin-bottom: 22px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card h3 {
    margin: 0 0 10px;
}

.product-card p {
    color: var(--muted);
}

.product-card a {
    color: var(--orange-dark);
    font-weight: 800;
    text-decoration: none;
}

.update-block,
.cta-card,
.software-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.65fr);
    gap: 34px;
    align-items: start;
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.feature-list li {
    padding-left: 26px;
    position: relative;
}

.feature-list li::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--orange);
    position: absolute;
    left: 4px;
    top: 10px;
}

.feature-list.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.cta-section {
    background: var(--navy);
    color: #ffffff;
}

.cta-card {
    align-items: center;
}

.cta-card p {
    color: #d8dee8;
}

.site-footer {
    background: #0b1220;
    color: #cbd5e1;
}

.page-hero {
    padding: 58px 0;
}

.page-hero p,
.software-main p {
    color: var(--muted);
}

.lead {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

.software-main h3,
.download-panel h3 {
    margin-top: 24px;
}

.note-box {
    background: #fff7ed;
    border-color: #fed7aa;
    margin: 24px 0;
}

.note-box p {
    margin-bottom: 0;
}

.download-panel {
    position: sticky;
    top: 92px;
}

.download-path {
    display: block;
    margin-top: 8px;
    padding-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

[dir="rtl"] body {
    text-align: right;
}

[dir="rtl"] .feature-list li {
    padding-left: 0;
    padding-right: 26px;
}

[dir="rtl"] .feature-list li::before {
    left: auto;
    right: 4px;
}

[dir="rtl"] .download-path {
    direction: ltr;
    text-align: right;
}

@media (max-width: 820px) {
    .hero-grid,
    .update-block,
    .cta-card,
    .software-layout,
    .product-grid,
    .feature-list.two-column {
        grid-template-columns: 1fr;
    }

    .nav-shell,
    .footer-shell {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }

    .hero {
        padding: 54px 0;
    }

    .section {
        padding: 46px 0;
    }

    .download-panel {
        position: static;
    }
}

/* Member panel styles */
.auth-page {
    width: min(440px, calc(100% - 32px));
    margin: 60px auto;
}

.page-shell {
    width: min(800px, calc(100% - 32px));
    margin: 40px auto;
}

.page-shell.wide {
    width: min(960px, calc(100% - 32px));
}

.form-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 3px;
    padding: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #101827;
    font-size: 14px;
}

.form-label .required {
    color: #dc2626;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
    color: #101827;
}

.form-control:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249,115,22,0.15);
}

.form-control[disabled] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

select.form-control {
    appearance: auto;
}

textarea.form-control {
    resize: vertical;
}

.form-hint {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

.form-actions .btn {
    min-width: 110px;
    white-space: nowrap;
}

/* Override .btn for form use */
.btn.primary {
    background: var(--orange);
    color: #ffffff;
    font-weight: 600;
    border-radius: 3px;
}

.btn.primary:hover {
    background: var(--orange-dark);
}

.btn.secondary {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
    font-weight: 600;
    border-radius: 3px;
}

.btn.secondary:hover {
    background: #f9fafb;
}

.btn.full {
    width: 100%;
    margin-top: 12px;
}

.btn.small {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
}

/* Remove old .form-row styles */
.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #101827;
}

.form-row .required {
    color: #dc2626;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249,115,22,0.15);
}

.form-row input[disabled] {
    background: #f3f4f6;
    color: #6b7280;
}

.field-hint {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* Account dropdown menu */
.account-menu {
    position: relative;
}

.account-checkbox {
    display: none;
}

.account-toggle {
    color: #e5e7eb;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.account-toggle:hover,
.account-toggle:focus-within {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.account-toggle::after {
    content: "\25BE";
    font-size: 12px;
    line-height: 1;
}

.account-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 100;
    padding: 6px 0;
    margin-top: 4px;
}

.account-menu:hover .account-dropdown,
.account-checkbox:checked ~ .account-dropdown {
    display: block;
}

.account-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.account-dropdown a:hover {
    background: #f3f4f6;
    color: #101827;
}

.account-dropdown .account-divider {
    height: 1px;
    background: #dfe5ee;
    margin: 6px 0;
}

.account-dropdown .account-label {
    display: block;
    padding: 8px 16px 4px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Panel card grid */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.empty-state-content {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-content h2 {
    margin-top: 0;
    color: #6b7280;
}

.empty-state-content p {
    color: #9ca3af;
}

.empty-state-content .btn {
    margin-top: 16px;
}

.msg-box {
    padding: 12px 16px;
    border-radius: 3px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}

.msg-box.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.msg-box.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.member-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 3px;
    padding: 20px;
}

.member-summary-item {
    padding: 8px;
}

.ms-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ms-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #101827;
}

.panel-card {
    display: block;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 3px;
    padding: 24px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.panel-card:hover {
    border-color: #f97316;
    box-shadow: 0 2px 8px rgba(249,115,22,0.1);
}

.panel-card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.panel-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #101827;
    margin-bottom: 8px;
}

.panel-card-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.panel-card-exit .panel-card-title {
    color: #991b1b;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 3px;
    overflow: hidden;
}

.ticket-table th,
.ticket-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #dfe5ee;
    font-size: 13px;
}

.ticket-table th {
    background: #f4f7fb;
    color: #101827;
    font-weight: 600;
}

.ticket-table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge.open {
    background: #dbeafe;
    color: #1e40af;
}

.badge.progress {
    background: #fef3c7;
    color: #92400e;
}

.badge.waiting {
    background: #f3f4f6;
    color: #6b7280;
}

.badge.closed {
    background: #d1fae5;
    color: #065f46;
}

@media (max-width: 640px) {
    .site-nav {
        flex-wrap: wrap;
        gap: 4px;
    }
    .account-dropdown {
        right: auto;
        left: 0;
    }
}

.ticket-header {
    margin-bottom: 20px;
}

.ticket-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ticket-subject {
    margin: 0;
    font-size: 18px;
}

.ticket-meta {
    color: #6b7280;
    font-size: 13px;
    margin-top: 8px;
}

.ticket-divider {
    border: none;
    border-top: 1px solid #dfe5ee;
    margin: 16px 0;
}

.ticket-message {
    line-height: 1.6;
    white-space: pre-wrap;
}

.member-nav {
    margin-bottom: 20px;
}

.member-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 6px;
}

.member-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    border-radius: 3px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.member-nav-link:hover {
    background: #f3f4f6;
    color: #101827;
}

.member-nav-link.active {
    background: var(--orange);
    color: #fff;
}

.member-nav-link.logout {
    color: #dc2626;
}

.member-nav-link.logout:hover {
    background: #fef2f2;
}

.member-nav-link.logout.active {
    background: #dc2626;
    color: #fff;
}

.member-page-title {
    margin: 0 0 6px;
    font-size: 24px;
}

.member-page-desc {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 14px;
}

.member-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.member-summary-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 16px;
}

.member-summary-card .ms-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.member-summary-card .ms-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #101827;
}

@media (max-width: 640px) {
    .member-nav-inner {
        gap: 3px;
        padding: 4px;
    }
    .member-nav-link {
        font-size: 12px;
        padding: 5px 8px;
    }
    .member-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}
