* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #17202a;
    --muted: #6b7280;
    --border: #e5e7eb;
    --dark: #111827;
    --accent: #d79b2b;
    --accent-dark: #b87910;
    --success: #157347;
    --danger: #b42318;
    --sidebar: #111827;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

button,
input {
    font: inherit;
}

.hidden {
    display: none !important;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-brand {
    background: var(--dark);
    color: white;
    padding: 64px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 26px;
    flex: 0 0 auto;
}

.brand-mark.small {
    width: 42px;
    height: 42px;
    font-size: 21px;
    border-radius: 11px;
}

.brand-name {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
}

.brand-subtitle {
    margin-top: 3px;
    color: #9ca3af;
    font-size: 13px;
}

.login-brand > .brand-mark {
    margin-bottom: 12px;
}

.login-brand > .brand-name {
    display: none;
}

.brand-copy {
    margin-top: auto;
    margin-bottom: 40px;
    max-width: 680px;
}

.brand-copy h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    margin: 0 0 24px;
    letter-spacing: -2px;
}

.brand-copy p {
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.6;
    max-width: 550px;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 440px;
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 44px;
}

.login-card h2 {
    font-size: 36px;
    margin: 0 0 10px;
    letter-spacing: -1px;
}

.login-intro {
    color: var(--muted);
    margin: 0 0 36px;
}

.login-card label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 20px 0 9px;
}

.login-card input {
    width: 100%;
    border: 1px solid var(--border);
    background: white;
    border-radius: 10px;
    padding: 15px 14px;
    outline: none;
    transition: .2s;
}

.login-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(215, 155, 43, .15);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 90px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
}

.primary-button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 24px;
    background: var(--dark);
    color: white;
    cursor: pointer;
    font-weight: 800;
    transition: .2s;
}

.primary-button:hover {
    background: #252f3f;
}

.primary-button:disabled {
    opacity: .6;
    cursor: wait;
}

.form-error {
    min-height: 22px;
    margin-top: 12px;
    color: var(--danger);
    font-size: 14px;
}

.login-footer {
    margin-top: 28px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

/* DASHBOARD */

.dashboard-page {
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    background: var(--sidebar);
    color: white;
    padding: 24px 16px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 28px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    border-radius: 9px;
    transition: .2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,.09);
    color: white;
}

.nav-item.active {
    border-left: 3px solid var(--accent);
}

.logout-button {
    margin-top: auto;
    border: 1px solid rgba(255,255,255,.14);
    background: transparent;
    color: white;
    padding: 12px 14px;
    border-radius: 9px;
    cursor: pointer;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
}

.topbar {
    height: 76px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    font-weight: 800;
}

.user-chip {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 13px;
}

.user-info span {
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px;
}

.menu-button {
    display: none;
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    margin-right: 12px;
}

.page-content {
    padding: 34px;
    max-width: 1500px;
    margin: auto;
}

.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.eyebrow {
    display: block;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 9px;
}

.welcome-row h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -1px;
}

.welcome-row p {
    color: var(--muted);
}

.customer-code-box {
    background: white;
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 12px;
    min-width: 160px;
}

.customer-code-box span {
    color: var(--muted);
    font-size: 11px;
    display: block;
}

.customer-code-box strong {
    display: block;
    margin-top: 7px;
    font-size: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    display: block;
}

.stat-card strong {
    display: block;
    font-size: 27px;
    margin: 11px 0 10px;
}

.stat-foot {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-section {
    margin-top: 34px;
}

.section-heading h2 {
    margin: 0;
}

.quick-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quick-card {
    background: white;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    padding: 22px;
    border-radius: 14px;
    transition: .2s;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15,23,42,.07);
}

.quick-icon {
    width: 42px;
    height: 42px;
    background: var(--surface-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 17px;
    font-weight: 900;
}

.quick-card strong {
    display: block;
    font-size: 16px;
}

.quick-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.info-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}

.info-panel h2 {
    margin: 0;
}

.company-details {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.company-details > div {
    padding: 14px 0;
}

.company-details span {
    color: var(--muted);
    font-size: 11px;
    display: block;
}

.company-details strong {
    display: block;
    margin-top: 7px;
    font-size: 14px;
    word-break: break-word;
}

.loading-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--dark);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .company-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 28px;
    }

    .mobile-logo {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: .25s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-button {
        display: block;
    }

    .topbar {
        padding: 0 18px;
    }

    .topbar-title {
        display: none;
    }

    .page-content {
        padding: 24px 18px;
    }

    .welcome-row {
        flex-direction: column;
    }

    .customer-code-box {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .stats-grid,
    .quick-grid,
    .company-details {
        grid-template-columns: 1fr;
    }

    .welcome-row h1 {
        font-size: 28px;
    }

    .login-card h2 {
        font-size: 30px;
    }

    .user-info {
        display: none;
    }
}

/* CUSTOMER REQUESTS */

.requests-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.requests-header h1 {
    margin: 6px 0 8px;
}

.requests-header p {
    margin: 0;
    color: var(--muted);
}

.requests-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 20px;
    min-height: 650px;
}

.requests-list-panel,
.request-detail-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.requests-list-header {
    padding: 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.requests-list-header span {
    background: var(--surface-soft);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--muted);
}

.requests-list {
    max-height: 700px;
    overflow-y: auto;
}

.requests-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}

.request-list-item {
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: white;
    padding: 17px;
    cursor: pointer;
}

.request-list-item:hover,
.request-list-item.active {
    background: var(--surface-soft);
}

.request-list-item.active {
    border-left: 4px solid var(--accent);
}

.request-list-item strong {
    display: block;
    margin: 10px 0;
    line-height: 1.4;
}

.request-list-top,
.request-list-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.request-list-foot {
    color: var(--muted);
    font-size: 12px;
}

.request-number {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-dark);
}

.request-status {
    display: inline-flex;
    align-items: center;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    background: #eef2f7;
    color: #475569;
}

.status-new {
    background: #fff7e8;
    color: #9a6700;
}

.status-assigned,
.status-in_progress {
    background: #edf6ff;
    color: #175cd3;
}

.status-waiting_customer {
    background: #fff4ed;
    color: #b54708;
}

.status-resolved {
    background: #ecfdf3;
    color: #067647;
}

.status-closed,
.status-cancelled {
    background: #f2f4f7;
    color: #667085;
}

.request-detail-panel {
    padding: 24px;
}

.request-detail-empty {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
}

.request-detail-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.request-detail-empty h2 {
    color: var(--text);
    margin-bottom: 5px;
}

.request-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.request-detail-head h2 {
    margin: 6px 0 0;
}

.request-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.request-meta-grid > div {
    background: var(--surface-soft);
    padding: 12px;
    border-radius: 10px;
}

.request-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.request-meta-grid strong {
    font-size: 13px;
}

.request-messages {
    min-height: 300px;
    max-height: 430px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px;
}

.request-message {
    max-width: 76%;
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 12px;
}

.request-message.customer {
    margin-left: auto;
    background: var(--dark);
    color: white;
}

.request-message.staff {
    margin-right: auto;
    background: white;
    border: 1px solid var(--border);
}

.request-message-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 11px;
}

.request-message-head span {
    opacity: .7;
}

.request-message-body {
    line-height: 1.55;
    font-size: 14px;
}

.request-reply-form {
    margin-top: 18px;
}

.request-reply-form label,
.request-modal-card label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin: 15px 0 7px;
}

.request-reply-form textarea,
.request-modal-card textarea,
.request-modal-card input,
.request-modal-card select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 13px;
    background: white;
    font: inherit;
    outline: none;
}

.request-reply-form textarea:focus,
.request-modal-card textarea:focus,
.request-modal-card input:focus,
.request-modal-card select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(215,155,43,.13);
}

.request-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
}

.request-form-error {
    color: var(--danger);
    font-size: 13px;
    min-height: 18px;
}

.request-primary-button,
.request-secondary-button {
    border-radius: 9px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
}

.request-primary-button {
    border: 0;
    background: var(--dark);
    color: white;
}

.request-primary-button:hover {
    background: #252f3f;
}

.request-primary-button:disabled {
    opacity: .6;
    cursor: wait;
}

.request-secondary-button {
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
}

.request-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.62);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.request-modal-card {
    background: white;
    width: 100%;
    max-width: 620px;
    border-radius: 16px;
    padding: 24px;
    max-height: 92vh;
    overflow-y: auto;
}

.request-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.request-modal-head h2 {
    margin: 5px 0 0;
}

.request-modal-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.request-modal-actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 1050px) {
    .requests-layout {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .request-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 780px) {
    .requests-header {
        flex-direction: column;
    }

    .requests-layout {
        grid-template-columns: 1fr;
    }

    .requests-list {
        max-height: 320px;
    }

    .request-detail-empty {
        min-height: 300px;
    }

    .request-meta-grid {
        grid-template-columns: 1fr;
    }

    .request-message {
        max-width: 92%;
    }
}

/* ANNOUNCEMENTS */

.nav-badge {
    margin-left: auto;
    min-width: 21px;
    height: 21px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    padding: 0 6px;
}

.announcements-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.announcements-header h1 {
    margin: 6px 0 8px;
}

.announcements-header p {
    margin: 0;
    color: var(--muted);
}

.announcement-unread-box {
    min-width: 130px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 18px;
}

.announcement-unread-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.announcement-unread-box strong {
    display: block;
    margin-top: 5px;
    font-size: 24px;
}

.announcements-layout {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 20px;
    min-height: 650px;
}

.announcements-list-panel,
.announcement-detail-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.announcement-filters {
    padding: 13px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.announcement-filter {
    border: 1px solid var(--border);
    background: white;
    border-radius: 20px;
    padding: 7px 11px;
    font-size: 12px;
    cursor: pointer;
}

.announcement-filter.active {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

.announcements-list {
    max-height: 720px;
    overflow-y: auto;
}

.announcements-empty {
    padding: 50px 20px;
    color: var(--muted);
    text-align: center;
}

.announcement-list-item {
    width: 100%;
    text-align: left;
    background: white;
    border: 0;
    border-bottom: 1px solid var(--border);
    padding: 17px;
    cursor: pointer;
    position: relative;
}

.announcement-list-item:hover,
.announcement-list-item.active {
    background: var(--surface-soft);
}

.announcement-list-item.active {
    border-left: 4px solid var(--accent);
}

.announcement-list-item.unread strong {
    font-weight: 900;
}

.announcement-list-item strong {
    display: block;
    margin: 10px 0 7px;
    line-height: 1.4;
}

.announcement-list-item p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 12px;
}

.announcement-list-top,
.announcement-list-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.announcement-list-bottom {
    color: var(--muted);
    font-size: 11px;
}

.announcement-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.announcement-pin {
    color: var(--accent);
}

.announcement-type {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    background: #eef2f7;
    color: #475569;
}

.type-news {
    background: #edf6ff;
    color: #175cd3;
}

.type-offer {
    background: #ecfdf3;
    color: #067647;
}

.type-important {
    background: #fff1f0;
    color: #b42318;
}

.type-technical {
    background: #f4f3ff;
    color: #5925dc;
}

.announcement-detail-panel {
    padding: 28px;
}

.announcement-empty-state {
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--muted);
}

.announcement-empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--surface-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.announcement-empty-state h2 {
    color: var(--text);
    margin-bottom: 5px;
}

.announcement-detail-top {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: flex-start;
}

.announcement-detail-top h2 {
    font-size: 30px;
    line-height: 1.2;
    margin: 12px 0 0;
}

.announcement-pinned {
    padding: 7px 10px;
    border-radius: 20px;
    background: #fff7e8;
    color: #9a6700;
    font-size: 11px;
    font-weight: 800;
}

.announcement-date {
    color: var(--muted);
    font-size: 12px;
    margin-top: 15px;
}

.announcement-detail-summary {
    font-size: 18px;
    font-weight: 700;
    margin-top: 28px;
    line-height: 1.6;
}

.announcement-detail-content {
    margin-top: 20px;
    line-height: 1.75;
    font-size: 15px;
}

@media (max-width: 1000px) {

    .announcements-layout {
        grid-template-columns: 330px minmax(0, 1fr);
    }
}

@media (max-width: 780px) {

    .announcements-header {
        flex-direction: column;
    }

    .announcements-layout {
        grid-template-columns: 1fr;
    }

    .announcements-list {
        max-height: 330px;
    }

    .announcement-detail-top h2 {
        font-size: 24px;
    }
}

/* B2B ORDERS */

.orders-title-row {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:24px;
}

.orders-title-row h1 {
    margin:6px 0 8px;
}

.orders-title-row p {
    color:var(--muted);
    margin:0;
}

.orders-stats {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin-bottom:20px;
}

.orders-stat {
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:17px;
}

.orders-stat span {
    display:block;
    font-size:12px;
    color:var(--muted);
}

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

.orders-layout {
    display:grid;
    grid-template-columns:370px minmax(0,1fr);
    gap:20px;
}

.orders-list-panel,
.order-detail-panel {
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
}

.order-list-item {
    width:100%;
    display:block;
    padding:17px;
    background:#fff;
    border:0;
    border-bottom:1px solid var(--border);
    text-align:left;
    cursor:pointer;
}

.order-list-item:hover,
.order-list-item.active {
    background:var(--surface-soft);
}

.order-list-item.active {
    border-left:4px solid var(--accent);
}

.order-list-top,
.order-list-bottom {
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
}

.order-list-meta {
    margin:9px 0 14px;
    color:var(--muted);
    font-size:12px;
}

.order-list-bottom {
    color:var(--muted);
    font-size:12px;
}

.order-list-bottom strong {
    color:var(--text);
    font-size:15px;
}

.order-status {
    display:inline-flex;
    border-radius:30px;
    padding:5px 9px;
    font-size:11px;
    font-weight:800;
    background:#eef2f7;
}

.status-submitted {
    background:#edf6ff;
    color:#175cd3;
}

.status-processing,
.status-confirmed {
    background:#fff7e8;
    color:#9a6700;
}

.status-ready,
.status-shipped {
    background:#f4f3ff;
    color:#5925dc;
}

.status-completed {
    background:#ecfdf3;
    color:#067647;
}

.status-cancelled {
    background:#fff1f0;
    color:#b42318;
}

.order-detail-panel {
    padding:27px;
    min-height:560px;
}

.order-detail-header {
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:flex-start;
}

.order-detail-header h2 {
    margin:10px 0 5px;
    font-size:28px;
}

.order-detail-header > div > span:last-child {
    color:var(--muted);
    font-size:12px;
}

.order-grand-total {
    font-size:26px;
}

.order-reference {
    margin-top:25px;
    background:var(--surface-soft);
    border-radius:10px;
    padding:13px 15px;
}

.order-reference span {
    display:block;
    font-size:11px;
    color:var(--muted);
}

.order-reference strong {
    display:block;
    margin-top:4px;
}

.order-lines-table-wrap {
    overflow:auto;
    margin-top:25px;
}

.order-lines-table {
    width:100%;
    border-collapse:collapse;
}

.order-lines-table th,
.order-lines-table td {
    padding:13px 10px;
    text-align:left;
    border-bottom:1px solid var(--border);
    white-space:nowrap;
}

.order-lines-table th {
    font-size:11px;
    color:var(--muted);
}

.order-lines-table td {
    font-size:13px;
}

.order-lines-table td:first-child {
    white-space:normal;
}

.order-lines-table small {
    display:block;
    color:var(--muted);
    margin-top:3px;
}

.order-totals {
    width:320px;
    max-width:100%;
    margin:25px 0 0 auto;
}

.order-totals > div {
    display:flex;
    justify-content:space-between;
    gap:20px;
    padding:7px 0;
}

.order-total-final {
    border-top:1px solid var(--border);
    margin-top:7px;
    padding-top:14px !important;
    font-size:17px;
}

@media(max-width:900px) {

    .orders-stats {
        grid-template-columns:repeat(2,1fr);
    }

    .orders-layout {
        grid-template-columns:1fr;
    }
}

@media(max-width:600px) {

    .orders-title-row {
        flex-direction:column;
    }

    .orders-stats {
        grid-template-columns:1fr;
    }
}

/* PRODUCTS */

.topbar-actions {
    display:flex;
    align-items:center;
    gap:14px;
}

.cart-top-button {
    border:1px solid var(--border);
    background:#fff;
    border-radius:10px;
    padding:9px 13px;
    font-weight:700;
    cursor:pointer;
}

.cart-top-button span {
    display:inline-flex;
    min-width:21px;
    height:21px;
    align-items:center;
    justify-content:center;
    margin-left:6px;
    padding:0 6px;
    border-radius:20px;
    background:var(--accent);
    color:var(--dark);
    font-size:11px;
}

.products-title-row {
    margin-bottom:20px;
}

.products-title-row h1 {
    margin:6px 0 8px;
}

.products-title-row p {
    margin:0;
    color:var(--muted);
}

.products-toolbar {
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:15px;
    margin-bottom:20px;
}

.product-search-wrap {
    display:flex;
    gap:8px;
}

.product-search-wrap input {
    flex:1;
    min-width:0;
    border:1px solid var(--border);
    border-radius:9px;
    padding:11px 13px;
    font:inherit;
}

.product-search-wrap button {
    border:0;
    border-radius:9px;
    background:var(--dark);
    color:#fff;
    padding:0 18px;
    font-weight:700;
    cursor:pointer;
}

.products-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:16px;
}

.products-empty {
    grid-column:1/-1;
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:50px;
    text-align:center;
    color:var(--muted);
}

.product-card {
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:17px;
    display:flex;
    flex-direction:column;
    min-height:310px;
}

.product-card-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}

.product-sku {
    font-size:11px;
    color:var(--muted);
    font-weight:700;
}

.product-stock {
    font-size:10px;
    font-weight:800;
    border-radius:20px;
    padding:5px 8px;
}

.in-stock {
    background:#ecfdf3;
    color:#067647;
}

.out-stock {
    background:#fff1f0;
    color:#b42318;
}

.product-card h3 {
    margin:14px 0 7px;
    line-height:1.35;
    font-size:17px;
}

.product-description {
    margin:0;
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
    min-height:35px;
}

.product-stock-info {
    font-size:11px;
    color:var(--muted);
    margin-top:12px;
}

.product-pricing {
    margin-top:auto;
    padding-top:17px;
}

.product-base-price {
    color:var(--muted);
    font-size:11px;
    margin-bottom:4px;
}

.product-customer-price {
    display:flex;
    align-items:baseline;
    gap:7px;
    flex-wrap:wrap;
}

.product-customer-price strong {
    font-size:24px;
}

.product-add-row {
    display:flex;
    gap:8px;
    margin-top:15px;
}

.product-qty-box {
    display:grid;
    grid-template-columns:32px 48px 32px;
    border:1px solid var(--border);
    border-radius:8px;
    overflow:hidden;
}

.product-qty-box button {
    border:0;
    background:#f8fafc;
    cursor:pointer;
    font-size:18px;
}

.product-qty-box input {
    border:0;
    width:100%;
    text-align:center;
    outline:0;
}

.add-cart-button {
    flex:1;
    border:0;
    border-radius:8px;
    background:var(--dark);
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

/* CART */

.cart-overlay {
    position:fixed;
    inset:0;
    z-index:998;
    background:rgba(15,23,42,.38);
}

.cart-drawer {
    position:fixed;
    top:0;
    right:-480px;
    bottom:0;
    z-index:999;
    width:460px;
    max-width:100%;
    background:#fff;
    box-shadow:-12px 0 40px rgba(15,23,42,.16);
    display:flex;
    flex-direction:column;
    transition:right .22s ease;
}

.cart-drawer.open {
    right:0;
}

.cart-drawer-header {
    padding:20px;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
}

.cart-drawer-header h2 {
    margin:4px 0 0;
}

.cart-close-button {
    width:34px;
    height:34px;
    border:0;
    border-radius:8px;
    background:#f1f5f9;
    font-size:22px;
    cursor:pointer;
}

.cart-items {
    flex:1;
    overflow:auto;
}

.cart-empty {
    min-height:250px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:30px;
    color:var(--muted);
}

.cart-item {
    display:flex;
    justify-content:space-between;
    gap:15px;
    padding:16px 20px;
    border-bottom:1px solid var(--border);
}

.cart-item-main {
    display:flex;
    flex-direction:column;
    gap:4px;
}

.cart-item-side {
    text-align:right;
}

.remove-cart-button {
    margin-top:7px;
    width:25px;
    height:25px;
    border:0;
    border-radius:50%;
    background:#fff1f0;
    color:#b42318;
    cursor:pointer;
}

.cart-checkout-box {
    border-top:1px solid var(--border);
    padding:18px 20px 22px;
    background:#fff;
}

.cart-total-line {
    display:flex;
    justify-content:space-between;
    gap:20px;
    padding:5px 0;
    font-size:13px;
}

.cart-grand-line {
    margin-top:5px;
    padding-top:12px;
    border-top:1px solid var(--border);
    font-size:18px;
}

.cart-field {
    display:block;
    margin-top:14px;
}

.cart-field span {
    display:block;
    font-size:11px;
    font-weight:700;
    margin-bottom:5px;
}

.cart-field input,
.cart-field textarea {
    width:100%;
    box-sizing:border-box;
    border:1px solid var(--border);
    border-radius:8px;
    padding:9px 10px;
    font:inherit;
}

.checkout-button {
    width:100%;
    margin-top:15px;
    border:0;
    border-radius:9px;
    padding:12px;
    background:var(--accent);
    color:var(--dark);
    font-weight:900;
    cursor:pointer;
}

.checkout-message {
    padding:10px;
    margin-top:12px;
    border-radius:8px;
    font-size:12px;
}

.checkout-message.success {
    background:#ecfdf3;
    color:#067647;
}

.checkout-message.error {
    background:#fff1f0;
    color:#b42318;
}

/* B2B reconstructed document */
.document-row {
    cursor: pointer;
}

.document-row:hover,
.document-row.selected {
    background: #f4f6f8;
}

.b2b-document-sheet {
    background: #fff;
    max-width: 100%;
    color: #171717;
}

.doc-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.doc-print-button {
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    background: #171717;
    color: #fff;
}

.doc-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 18px;
    border-bottom: 2px solid #171717;
}

.doc-company {
    font-size: 24px;
    font-weight: 800;
}

.doc-copy-label {
    font-size: 11px;
    margin-top: 5px;
    letter-spacing: 1px;
}

.doc-title-block {
    text-align: right;
}

.doc-title-block h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.doc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 18px 0;
}

.doc-info-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.doc-info-box strong {
    display: block;
    margin-bottom: 5px;
}

.doc-table-wrap {
    overflow-x: auto;
}

.doc-lines-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.doc-lines-table th,
.doc-lines-table td {
    border: 1px solid #ddd;
    padding: 7px;
    vertical-align: top;
}

.doc-lines-table th {
    background: #f2f2f2;
    font-weight: 700;
}

.num-cell {
    text-align: right;
    white-space: nowrap;
}

.doc-quantity-total {
    margin-top: 18px;
    text-align: right;
    font-size: 15px;
}

.doc-totals {
    width: 320px;
    max-width: 100%;
    margin: 20px 0 0 auto;
}

.doc-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 7px 0;
    border-bottom: 1px solid #ddd;
}

.doc-totals .grand-total {
    font-size: 17px;
    border-bottom: 2px solid #171717;
}

.doc-footer {
    margin-top: 28px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-size: 10px;
    color: #666;
}

@media (max-width: 800px) {
    .doc-info-grid {
        grid-template-columns: 1fr;
    }

    .doc-header {
        flex-direction: column;
    }

    .doc-title-block {
        text-align: left;
    }
}

@media print {

    body * {
        visibility: hidden !important;
    }

    #printableDocument,
    #printableDocument * {
        visibility: visible !important;
    }

    #printableDocument {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 8mm;
        box-sizing: border-box;
    }

    .no-print {
        display: none !important;
    }

    .doc-lines-table {
        font-size: 9pt;
    }

    .doc-lines-table thead {
        display: table-header-group;
    }

    .doc-lines-table tr {
        break-inside: avoid;
    }

    @page {
        size: A4;
        margin: 8mm;
    }
}

.document-print-link{
    border:1px solid #222;
    background:#fff;
    color:#111;
    border-radius:6px;
    padding:6px 10px;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
}

.document-print-link:hover{
    background:#111;
    color:#fff;
}

.document-detail-card{
    width:100%;
}

.document-detail-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:20px;
}

.document-detail-head h2{
    margin:5px 0;
}

.document-detail-meta{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:18px;
}

.document-detail-meta > div{
    padding:10px;
    border:1px solid #e1e1e1;
    border-radius:8px;
}

.document-detail-meta strong,
.document-detail-meta span{
    display:block;
}

.document-detail-meta span{
    margin-top:4px;
}

.document-detail-total,
.document-detail-totals{
    margin-top:18px;
    text-align:right;
}

.document-detail-totals > div{
    margin:6px 0;
}

@media(max-width:700px){
    .document-detail-meta{
        grid-template-columns:1fr;
    }
}

/* =========================================================
   DOCUMENTS PAGE - PREMIUM LAYOUT
   ========================================================= */

.dashboard-page .orders-layout{
    grid-template-columns:430px minmax(0,1fr);
    gap:24px;
    align-items:start;
}

.dashboard-page .orders-list-panel,
.dashboard-page .order-detail-panel{
    border:1px solid #e4e8ee;
    border-radius:18px;
    box-shadow:0 8px 28px rgba(15,23,42,.045);
    background:#fff;
}

.dashboard-page .orders-list-panel{
    overflow:hidden;
}

.dashboard-page .order-detail-panel{
    min-height:650px;
    padding:30px;
}

/* Left document list */
#documentsTable .b2b-table-wrap{
    overflow:visible;
}

#documentsTable .b2b-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
}

#documentsTable .b2b-table thead{
    display:none;
}

#documentsTable .b2b-table tbody{
    display:block;
}

#documentsTable .document-row{
    display:grid;
    grid-template-columns:90px minmax(0,1fr);
    gap:7px 14px;
    position:relative;
    padding:18px 18px 18px 22px;
    border-bottom:1px solid #edf0f4;
    cursor:pointer;
    transition:
        background .18s ease,
        box-shadow .18s ease;
}

#documentsTable .document-row:last-child{
    border-bottom:0;
}

#documentsTable .document-row:hover{
    background:#fafbfc;
}

#documentsTable .document-row.selected{
    background:#fff9ed;
}

#documentsTable .document-row.selected::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:4px;
    background:#d88a00;
}

/* Reset table cells into card fields */
#documentsTable .document-row td{
    display:block;
    border:0;
    padding:0;
    min-width:0;
}

/* Date */
#documentsTable .document-row td:nth-child(1){
    grid-column:1;
    grid-row:1;
    font-size:12px;
    color:#687386;
    font-weight:700;
}

/* Type */
#documentsTable .document-row td:nth-child(2){
    grid-column:2;
    grid-row:1;
    font-size:14px;
    color:#172033;
    font-weight:800;
}

/* Document number */
#documentsTable .document-row td:nth-child(3){
    grid-column:1 / -1;
    grid-row:2;
    font-size:12px;
    color:#687386;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* Hide net + VAT from compact list */
#documentsTable .document-row td:nth-child(4),
#documentsTable .document-row td:nth-child(5){
    display:none;
}

/* Total */
#documentsTable .document-row td:nth-child(6){
    grid-column:1 / -1;
    grid-row:3;
    margin-top:3px;
    font-size:15px;
    color:#101828;
}

#documentsTable .document-row td:nth-child(6)::before{
    content:"Σύνολο: ";
    color:#8992a3;
    font-size:11px;
    font-weight:500;
}

#documentsTable .document-row td:nth-child(6) strong{
    font-size:15px;
}

/* If the button column exists */
#documentsTable .document-row td:nth-child(7){
    grid-column:1 / -1;
    grid-row:4;
    margin-top:4px;
}

.document-print-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:8px 13px;
    border:1px solid #d9dee6;
    border-radius:9px;
    background:#fff;
    color:#172033;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
    cursor:pointer;
    transition:.18s ease;
}

.document-print-link:hover{
    background:#172033;
    color:#fff;
    border-color:#172033;
}

/* Detail header */
.document-detail-head{
    padding-bottom:20px;
    border-bottom:1px solid #e9edf2;
    margin-bottom:22px;
}

.document-detail-head h2{
    margin:6px 0 4px;
    font-size:28px;
    letter-spacing:-.6px;
    color:#162033;
}

.document-detail-head > div > strong{
    font-size:13px;
    color:#667085;
}

/* Detail info cards */
.document-detail-meta{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:24px;
}

.document-detail-meta > div{
    min-width:0;
    padding:14px 15px;
    border:1px solid #e4e8ee;
    border-radius:12px;
    background:#fafbfc;
}

.document-detail-meta strong{
    font-size:11px;
    color:#788296;
    text-transform:uppercase;
    letter-spacing:.35px;
}

.document-detail-meta span{
    margin-top:6px;
    font-size:14px;
    color:#172033;
    font-weight:700;
}

/* Lines table */
#documentDetail .b2b-table-wrap{
    overflow:auto;
    border:1px solid #e5e9ef;
    border-radius:13px;
}

#documentDetail .b2b-table{
    width:100%;
    border-collapse:collapse;
}

#documentDetail .b2b-table th{
    padding:11px 12px;
    background:#f6f7f9;
    color:#687386;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.25px;
    border-bottom:1px solid #e5e9ef;
    white-space:nowrap;
}

#documentDetail .b2b-table td{
    padding:11px 12px;
    font-size:13px;
    color:#263144;
    border-bottom:1px solid #eef1f4;
    vertical-align:top;
}

#documentDetail .b2b-table tbody tr:last-child td{
    border-bottom:0;
}

#documentDetail .b2b-table tbody tr:hover{
    background:#fafbfc;
}

#documentDetail .b2b-table td:nth-child(1),
#documentDetail .b2b-table th:nth-child(1){
    width:42px;
    text-align:center;
}

#documentDetail .b2b-table td:last-child,
#documentDetail .b2b-table th:last-child{
    text-align:right;
}

.document-detail-total,
.document-detail-totals{
    margin-top:22px;
    padding-top:16px;
    border-top:1px solid #e6eaf0;
    font-size:14px;
}

.document-detail-total strong,
.document-detail-totals strong{
    font-size:17px;
    color:#172033;
}

/* Top-right profile */
.topbar .user-chip{
    padding:7px 10px 7px 7px;
    border:1px solid #e4e8ee;
    border-radius:30px;
    background:#fff;
}

.topbar .user-avatar{
    width:38px;
    height:38px;
    font-size:12px;
}

.topbar .user-info strong{
    font-size:12px;
    max-width:220px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.topbar .user-info span{
    max-width:220px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* Responsive */
@media(max-width:1200px){
    .dashboard-page .orders-layout{
        grid-template-columns:360px minmax(0,1fr);
    }

    .document-detail-meta{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .dashboard-page .orders-layout{
        grid-template-columns:1fr;
    }

    .dashboard-page .order-detail-panel{
        padding:20px;
    }
}

@media(max-width:600px){
    .document-detail-meta{
        grid-template-columns:1fr;
    }
}

/* =====================================================
   ACCOUNT PAGE - FULL WIDTH FINANCIAL VIEW
   ===================================================== */

.account-page .orders-title-row{
    margin-bottom:24px;
}

.account-page .orders-title-row h1{
    margin:6px 0 7px;
    font-size:34px;
    letter-spacing:-.8px;
}

.account-page .orders-title-row p{
    margin:0;
    color:var(--muted);
}

/* Financial KPI cards */
.account-page .orders-stats{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:15px;
    margin-bottom:22px;
}

.account-page .orders-stat{
    padding:18px 20px;
    border:1px solid #e3e7ed;
    border-radius:15px;
    background:#fff;
    box-shadow:0 6px 22px rgba(15,23,42,.035);
}

.account-page .orders-stat span{
    font-size:11px;
    color:#7a8494;
    text-transform:uppercase;
    letter-spacing:.35px;
}

.account-page .orders-stat strong{
    margin-top:8px;
    font-size:24px;
    color:#121b2c;
}

/* No more 370px + giant empty panel */
.account-page .orders-layout{
    display:block;
}

.account-page .orders-list-panel{
    width:100%;
    border:1px solid #e3e7ed;
    border-radius:16px;
    background:#fff;
    overflow:hidden;
    box-shadow:0 8px 28px rgba(15,23,42,.04);
}

.account-page .order-detail-panel{
    display:none;
}

/* Account history table */
.account-page #accountHistory{
    width:100%;
}

.account-page #accountHistory .b2b-table-wrap{
    width:100%;
    overflow-x:auto;
}

.account-page #accountHistory .b2b-table{
    width:100%;
    border-collapse:collapse;
}

.account-page #accountHistory .b2b-table th{
    padding:13px 18px;
    background:#f7f8fa;
    border-bottom:1px solid #e5e9ef;
    color:#667085;
    font-size:11px;
    text-align:left;
    text-transform:uppercase;
    letter-spacing:.35px;
    white-space:nowrap;
}

.account-page #accountHistory .b2b-table td{
    padding:16px 18px;
    border-bottom:1px solid #edf0f3;
    color:#253044;
    font-size:14px;
    white-space:nowrap;
}

.account-page #accountHistory .b2b-table tbody tr:last-child td{
    border-bottom:0;
}

.account-page #accountHistory .b2b-table tbody tr:hover{
    background:#fbfcfd;
}

/* Empty/loading state */
.account-page #accountState{
    min-height:180px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    color:#707a8c;
}

/* Topbar consistency */
.account-page .topbar .user-chip{
    padding:7px 11px 7px 7px;
    border:1px solid #e4e8ee;
    border-radius:30px;
    background:#fff;
}

@media(max-width:900px){

    .account-page .orders-stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px){

    .account-page .orders-stats{
        grid-template-columns:1fr;
    }

    .account-page .orders-title-row h1{
        font-size:28px;
    }
}

/* =========================================================
   B2B GLOBAL UI CONSISTENCY
   ========================================================= */

/* Topbar */
.dashboard-page .topbar{
    height:64px;
    padding:0 24px;
    background:#fff;
    border-bottom:1px solid #e6e9ee;
    display:flex;
    align-items:center;
    gap:18px;
}

.dashboard-page .topbar-title{
    font-size:16px;
    font-weight:800;
    color:#121b2c;
}

.dashboard-page .topbar .user-chip{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:9px;
    padding:5px 10px 5px 5px;
    border:1px solid #e5e9ef;
    border-radius:28px;
    background:#fff;
    min-width:0;
}

.dashboard-page .topbar .user-avatar{
    width:40px;
    height:40px;
    min-width:40px;
    border-radius:50%;
    background:#111b2b;
    color:#fff;
    font-size:13px;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
}

.dashboard-page .topbar .user-info{
    min-width:0;
}

.dashboard-page .topbar .user-info strong{
    display:block;
    max-width:230px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#101828;
    font-size:12px;
    line-height:1.25;
}

.dashboard-page .topbar .user-info span{
    display:block;
    max-width:230px;
    margin-top:2px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#667085;
    font-size:10px;
    line-height:1.25;
}

/* Sidebar */
.dashboard-page .sidebar{
    border-right:1px solid #e7eaf0;
}

.dashboard-page .sidebar-brand{
    padding-top:22px;
    padding-bottom:22px;
}

.dashboard-page .sidebar-nav{
    padding:8px 12px;
}

.dashboard-page .nav-item{
    min-height:44px;
    margin:3px 0;
    padding:10px 13px;
    border-radius:9px;
    font-size:13px;
    font-weight:650;
    transition:
        background .15s ease,
        color .15s ease;
}

.dashboard-page .nav-item:hover{
    background:#f5f6f8;
}

.dashboard-page .nav-item.active{
    background:#fff7e8;
    color:#9a6200;
    font-weight:800;
}

.dashboard-page .nav-item.active::before{
    border-radius:0 4px 4px 0;
}

/* Main content */
.dashboard-page .page-content{
    max-width:1540px;
    padding:34px 28px 44px;
}

.dashboard-page .orders-title-row h1,
.dashboard-page .products-title-row h1{
    color:#111b2b;
    letter-spacing:-.7px;
}

.dashboard-page .orders-title-row p,
.dashboard-page .products-title-row p{
    color:#667085;
}

/* Cards */
.dashboard-page .orders-stat,
.dashboard-page .orders-list-panel,
.dashboard-page .order-detail-panel,
.dashboard-page .products-toolbar{
    border-color:#e3e7ed;
}

/* Better desktop spacing */
@media(min-width:1201px){
    .dashboard-page .main-content{
        min-height:100vh;
    }
}

/* Tablet/mobile */
@media(max-width:900px){

    .dashboard-page .topbar{
        height:60px;
        padding:0 15px;
    }

    .dashboard-page .page-content{
        padding:24px 17px 34px;
    }
}

@media(max-width:600px){

    .dashboard-page .topbar .user-chip{
        border:0;
        padding:0;
    }

    .dashboard-page .topbar .user-avatar{
        width:38px;
        height:38px;
        min-width:38px;
    }

    .dashboard-page .topbar .user-info{
        display:none;
    }
}

/* Sidebar hover/focus fix */
.dashboard-page .sidebar .nav-item{
    color:#f4f7fb;
    background:transparent;
}

.dashboard-page .sidebar .nav-item span{
    color:inherit;
}

.dashboard-page .sidebar .nav-item:hover,
.dashboard-page .sidebar .nav-item:focus-visible{
    background:rgba(255,255,255,.08);
    color:#ffffff;
}

.dashboard-page .sidebar .nav-item.active{
    background:#fff6e7;
    color:#a96500;
    box-shadow:inset 3px 0 0 #e7a11a;
}

.dashboard-page .sidebar .nav-item.active:hover,
.dashboard-page .sidebar .nav-item.active:focus-visible{
    background:#fff6e7;
    color:#a96500;
}

.dashboard-page .sidebar .nav-item:active{
    transform:none;
}

.dashboard-page .sidebar .nav-item,
.dashboard-page .sidebar .nav-item:hover,
.dashboard-page .sidebar .nav-item.active{
    text-decoration:none;
}

.mydata-mark{
    margin-top:12px;
    text-align:right;
}

.mydata-mark span{
    display:block;
    font-size:9px;
    color:#666;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.mydata-mark strong{
    display:block;
    margin-top:3px;
    font-size:12px;
    color:#111;
}

.mydata-qr{
    margin-top:10px;
    text-align:right;
}

.mydata-qr img{
    width:82px;
    height:82px;
    object-fit:contain;
}

.mydata-qr div{
    margin-top:2px;
    font-size:8px;
    font-weight:700;
}


/* =========================================
   CUSTOMER ACCOUNT LEDGER
   ========================================= */

.account-page .account-ledger-panel{
    min-width:0;
}

.account-page .account-ledger-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:20px;
}

.account-page .account-ledger-head h2{
    margin:4px 0 6px;
}

.account-page .account-ledger-head p{
    margin:0;
}

.account-page .account-year-control{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width:150px;
}

.account-page .account-year-control span{
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.account-page .account-year-control select{
    min-height:42px;
    border:1px solid #d8dde5;
    border-radius:10px;
    padding:0 38px 0 12px;
    background:#fff;
    font:inherit;
    cursor:pointer;
}

.account-page .account-ledger-summary{
    display:grid;
    grid-template-columns:
        repeat(4,minmax(0,1fr));
    gap:10px;
    margin-bottom:18px;
}

.account-page .account-ledger-summary > div{
    border:1px solid #e4e7ec;
    border-radius:12px;
    padding:12px 14px;
    background:#fff;
}

.account-page .account-ledger-summary span{
    display:block;
    font-size:12px;
    opacity:.65;
    margin-bottom:5px;
}

.account-page .account-ledger-summary strong{
    display:block;
    font-size:15px;
}

.account-page .account-ledger-table-wrap{
    width:100%;
    overflow-x:auto;
}

.account-page .account-ledger-table{
    min-width:1050px;
}

.account-page .account-ledger-table th{
    white-space:nowrap;
}

.account-page .account-ledger-table td{
    vertical-align:top;
}

.account-page .account-ledger-table td small{
    display:block;
    margin-top:3px;
    opacity:.55;
    font-size:11px;
}

.account-page .account-ledger-table .account-date{
    white-space:nowrap;
}

.account-page .account-ledger-table .money{
    text-align:right;
    white-space:nowrap;
}

.account-page .account-ledger-table .balance{
    font-weight:700;
}

@media (max-width:1100px){

    .account-page .account-ledger-summary{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }
}

@media (max-width:680px){

    .account-page .account-ledger-head{
        flex-direction:column;
    }

    .account-page .account-year-control{
        width:100%;
    }

    .account-page .account-year-control select{
        width:100%;
    }

    .account-page .account-ledger-summary{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }
}

/* Show customer ledger panel on account page */
.account-page .order-detail-panel.account-ledger-panel{
    display:block;
    width:100%;
    margin-top:24px;
    border:1px solid #e3e7ed;
    border-radius:16px;
    background:#fff;
    padding:22px;
    box-shadow:0 8px 28px rgba(15,23,42,.04);
}

/* =========================================
   CUSTOMER LEDGER - BETTER TABLE SPACING
   ========================================= */

.account-page .account-ledger-table{
    width:100%;
    min-width:1180px;
    border-collapse:separate;
    border-spacing:0;
}

.account-page .account-ledger-table thead th{
    padding:14px 18px;
    background:#f7f9fc;
    border-bottom:1px solid #e5e9ef;
    color:#4b5565;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.03em;
    white-space:nowrap;
}

.account-page .account-ledger-table tbody td{
    padding:15px 18px;
    border-bottom:1px solid #edf0f4;
    font-size:14px;
    line-height:1.4;
    color:#202b3c;
}

.account-page .account-ledger-table tbody tr:hover{
    background:#fafbfd;
}

.account-page .account-ledger-table tbody tr:last-child td{
    border-bottom:0;
}

.account-page .account-ledger-table td:nth-child(1),
.account-page .account-ledger-table th:nth-child(1){
    width:115px;
}

.account-page .account-ledger-table td:nth-child(2),
.account-page .account-ledger-table th:nth-child(2){
    width:190px;
}

.account-page .account-ledger-table td:nth-child(3),
.account-page .account-ledger-table th:nth-child(3){
    width:230px;
}

.account-page .account-ledger-table td:nth-child(4),
.account-page .account-ledger-table th:nth-child(4){
    min-width:220px;
}

.account-page .account-ledger-table td:nth-child(5),
.account-page .account-ledger-table th:nth-child(5),
.account-page .account-ledger-table td:nth-child(6),
.account-page .account-ledger-table th:nth-child(6),
.account-page .account-ledger-table td:nth-child(7),
.account-page .account-ledger-table th:nth-child(7){
    width:140px;
    text-align:right;
}

.account-page .account-ledger-table td:nth-child(2) strong{
    display:block;
    font-size:14px;
    line-height:1.25;
}

.account-page .account-ledger-table td:nth-child(2) small{
    display:block;
    margin-top:5px;
    font-size:11px;
    line-height:1;
    color:#98a1b2;
}

.account-page .account-ledger-table td:nth-child(3){
    font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size:13px;
    white-space:nowrap;
}

.account-page .account-ledger-table .money{
    font-variant-numeric:tabular-nums;
}

.account-page .account-ledger-table .balance strong{
    font-size:15px;
}

.account-page .account-ledger-summary{
    gap:14px;
    margin-bottom:24px;
}

.account-page .account-ledger-summary > div{
    padding:15px 16px;
    border-radius:14px;
}

.account-page .account-ledger-head{
    margin-bottom:24px;
}

.account-page .account-ledger-table-wrap{
    border:1px solid #e5e9ef;
    border-radius:14px;
    overflow:auto;
    background:#fff;
}

.account-page .account-document-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:#175cd3;
    font-weight:700;
    text-decoration:none;
    border-bottom:1px dashed rgba(23,92,211,.35);
}

.account-page .account-document-link:hover{
    color:#0b4bbb;
    border-bottom-color:#0b4bbb;
}

.account-page .account-ledger-table tbody tr:hover
.account-document-link{
    text-decoration:none;
}


/* === 20260903 UI FIXES === */

/* ---------------------------------------------------------
   DOCUMENTS
   Scroll only the left documents pane when the list is long
   --------------------------------------------------------- */

.documents-page .orders-list-panel{
    max-height:calc(100vh - 230px);
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}

.documents-page #documentsTable .b2b-table-wrap{
    overflow:visible;
}

/* Subtle scrollbar */
.documents-page .orders-list-panel::-webkit-scrollbar{
    width:8px;
}

.documents-page .orders-list-panel::-webkit-scrollbar-track{
    background:#f4f6f8;
}

.documents-page .orders-list-panel::-webkit-scrollbar-thumb{
    background:#c8ced8;
    border-radius:10px;
}


/* ---------------------------------------------------------
   PRODUCTS TOPBAR
   Title stays left - Cart + profile stay right
   --------------------------------------------------------- */

.products-page .topbar{
    display:flex;
    align-items:center;
    width:100%;
}

.products-page .topbar-title{
    flex:0 1 auto;
}

.products-page .topbar-actions{
    margin-left:auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:14px;
}

.products-page .cart-top-button{
    flex:0 0 auto;
}

.products-page .user-chip{
    flex:0 0 auto;
}


/* Mobile */
@media (max-width:900px){

    .documents-page .orders-list-panel{
        max-height:none;
        overflow:visible;
    }

    .products-page .topbar-actions{
        margin-left:auto;
        gap:8px;
    }
}

/* === PRODUCTS TOPBAR ALIGN RIGHT FIX === */

.products-page .topbar-title{
    margin-right:auto;
}

.products-page .topbar-actions{
    margin-left:auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:14px;
}


/* === PRODUCTS TOPBAR FINAL ALIGNMENT === */

.products-page .topbar-title{
    margin-right:0;
}

.products-page .topbar-actions{
    margin-left:auto;
}


/* === PRODUCTS TOPBAR - HARD RIGHT ALIGNMENT === */

.products-page .topbar-actions{
    position:absolute;
    right:24px;
    top:50%;
    transform:translateY(-50%);
    margin:0;
    display:flex;
    align-items:center;
    gap:14px;
}

@media(max-width:900px){
    .products-page .topbar-actions{
        right:15px;
    }
}

/* === DOCUMENTS LEFT PANE FINAL SCROLL FIX === */

.documents-page .orders-layout{
    align-items:start;
}

.documents-page .orders-list-panel{
    height:calc(100vh - 230px);
    min-height:0;
    max-height:none;
    overflow-y:auto;
    overflow-x:hidden;
}

.documents-page #documentsTable{
    min-height:0;
}

@media(max-width:900px){
    .documents-page .orders-list-panel{
        height:calc(100vh - 190px);
        min-height:0;
        max-height:none;
        overflow-y:auto;
        overflow-x:hidden;
    }
}

/* Product image + clickable cards */
.product-card{
    cursor:pointer;
    transition:transform .15s ease, box-shadow .15s ease;
}

.product-card:hover{
    transform:translateY(-2px);
}

.product-card:focus{
    outline:2px solid currentColor;
    outline-offset:2px;
}

.product-image-wrap{
    width:100%;
    aspect-ratio:4 / 3;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    margin-bottom:14px;
    background:#fff;
    border-radius:10px;
}

.product-image{
    width:100%;
    height:100%;
    object-fit:contain;
}

.product-image-placeholder{
    font-size:13px;
    opacity:.55;
}

.product-category{
    font-size:12px;
    margin-top:6px;
    opacity:.72;
}

.product-brand{
    font-size:13px;
    font-weight:600;
    margin-top:4px;
}


/* Product modal */
.product-modal-open{
    overflow:hidden;
}

.product-modal-overlay{
    position:fixed;
    inset:0;
    z-index:99999;
    background:rgba(15,23,42,.68);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.product-modal{
    position:relative;
    width:min(980px,100%);
    max-height:90vh;
    overflow:auto;
    background:#fff;
    border-radius:18px;
    padding:28px;
    box-shadow:0 24px 70px rgba(0,0,0,.25);
}

.product-modal-close{
    position:absolute;
    top:12px;
    right:16px;
    border:0;
    background:transparent;
    font-size:34px;
    line-height:1;
    cursor:pointer;
    z-index:2;
}

.product-modal-grid{
    display:grid;
    grid-template-columns:minmax(280px,40%) 1fr;
    gap:30px;
}

.product-modal-image-area{
    min-height:320px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.product-modal-image{
    max-width:100%;
    max-height:430px;
    object-fit:contain;
}

.product-modal-image-placeholder{
    opacity:.55;
}

.product-modal-content h2{
    margin:12px 0 18px;
    font-size:26px;
}

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

.product-modal-info > div{
    padding:10px 0;
    border-bottom:1px solid #e5e7eb;
}

.product-modal-info span{
    display:block;
    font-size:12px;
    opacity:.65;
    margin-bottom:3px;
}

.product-modal-info strong{
    font-size:14px;
    overflow-wrap:anywhere;
}

.product-modal-price{
    margin-top:22px;
    padding:16px;
    border-radius:12px;
    background:#f8fafc;
}

.product-modal-price span,
.product-modal-price small{
    display:block;
}

.product-modal-price strong{
    display:block;
    margin:4px 0;
    font-size:28px;
}

.product-modal-description{
    margin-top:24px;
}

.product-modal-description h3{
    margin-bottom:8px;
}

.product-modal-description p{
    white-space:pre-line;
    line-height:1.6;
    overflow-wrap:anywhere;
}

@media(max-width:760px){

    .product-modal-overlay{
        padding:10px;
    }

    .product-modal{
        padding:22px 16px;
    }

    .product-modal-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .product-modal-image-area{
        min-height:220px;
    }

    .product-modal-info{
        grid-template-columns:1fr;
    }
}


.product-modal-cart-row{
    display:flex;
    align-items:center;
    gap:14px;
    margin-top:14px;
}

.product-modal-qty{
    display:flex;
    align-items:center;
    border:1px solid #dbe2ea;
    border-radius:10px;
    overflow:hidden;
    background:#fff;
}

.product-modal-qty button{
    width:40px;
    height:42px;
    border:0;
    background:#f8fafc;
    font-size:20px;
    cursor:pointer;
}

.product-modal-qty input{
    width:62px;
    height:42px;
    border:0;
    border-left:1px solid #e2e8f0;
    border-right:1px solid #e2e8f0;
    text-align:center;
    font-size:15px;
    outline:none;
}

.product-modal-add-cart{
    min-height:42px;
    padding:0 22px;
    border:0;
    border-radius:10px;
    cursor:pointer;
    font-weight:700;
}

.product-modal-add-cart:disabled{
    opacity:.55;
    cursor:not-allowed;
}

@media(max-width:520px){

    .product-modal-cart-row{
        flex-direction:column;
        align-items:stretch;
    }

    .product-modal-qty{
        justify-content:center;
    }

    .product-modal-add-cart{
        width:100%;
    }
}


/* B2B products pagination */
.products-pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    margin:28px 0 12px;
    flex-wrap:wrap;
}

.products-pagination-info{
    font-size:14px;
    color:#64748b;
    text-align:center;
}

.products-page-button{
    border:1px solid #d8dee8;
    background:#fff;
    padding:10px 16px;
    border-radius:8px;
    cursor:pointer;
    font-weight:600;
}

.products-page-button:hover:not(:disabled){
    background:#f8fafc;
}

.products-page-button:disabled{
    opacity:.45;
    cursor:not-allowed;
}

@media(max-width:640px){
    .products-pagination{
        gap:10px;
    }

    .products-pagination-info{
        width:100%;
        order:-1;
    }
}

/* Orders sidebar scroll */
#ordersApp .sidebar{
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}

/* === ORDERS LEFT PANE SCROLL === */
#ordersApp .orders-layout{
    align-items:start;
}

#ordersApp .orders-list-panel{
    height:calc(100vh - 230px);
    min-height:0;
    max-height:none;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
}

#ordersApp #ordersList{
    min-height:0;
}

@media(max-width:900px){
    #ordersApp .orders-list-panel{
        height:calc(100vh - 190px);
        min-height:0;
        max-height:none;
        overflow-y:auto;
        overflow-x:hidden;
    }
}

/* === B2B FIRST LOGIN ACTIVATION === */

body.activation-open{
    overflow:hidden;
}

.activation-overlay{
    position:fixed;
    inset:0;
    z-index:9999;
    background:rgba(15,23,42,.72);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    overflow-y:auto;
}

.activation-modal{
    width:min(680px,100%);
    background:#fff;
    border-radius:18px;
    padding:28px;
    box-shadow:0 24px 80px rgba(15,23,42,.28);
}

.activation-header h2{
    margin:5px 0 8px;
}

.activation-header p{
    margin:0 0 22px;
    color:#667085;
    line-height:1.5;
}

.activation-eyebrow{
    font-size:11px;
    font-weight:800;
    letter-spacing:.7px;
    color:#9a6700;
}

.activation-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}

.activation-grid .activation-full{
    grid-column:1 / -1;
}

.activation-grid label{
    display:block;
    margin-bottom:6px;
    font-size:12px;
    font-weight:700;
}

.activation-grid input,
.activation-otp{
    width:100%;
    border:1px solid #d9dee7;
    border-radius:9px;
    padding:12px 13px;
    font:inherit;
    outline:none;
}

.activation-grid input:focus,
.activation-otp:focus{
    border-color:#d99a24;
    box-shadow:0 0 0 3px rgba(217,154,36,.12);
}

.activation-primary{
    width:100%;
    margin-top:18px;
}

.activation-secondary{
    width:100%;
    margin-top:9px;
    border:0;
    background:transparent;
    cursor:pointer;
    color:#667085;
    font-weight:700;
    padding:10px;
}

.activation-error{
    min-height:20px;
    margin-top:10px;
    color:#b42318;
    font-size:13px;
}

.activation-code-copy{
    color:#667085;
    margin-bottom:16px;
}

.activation-otp{
    text-align:center;
    font-size:27px;
    font-weight:800;
    letter-spacing:8px;
}

@media(max-width:600px){

    .activation-overlay{
        padding:12px;
        align-items:flex-start;
    }

    .activation-modal{
        margin-top:18px;
        padding:21px;
    }

    .activation-grid{
        grid-template-columns:1fr;
    }

    .activation-grid .activation-full{
        grid-column:auto;
    }
}

/* === B2B SETTINGS === */

.settings-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:24px;
    align-items:start;
}

.settings-card{
    background:#fff;
    border:1px solid #e7eaf0;
    border-radius:16px;
    padding:24px;
    box-shadow:0 4px 18px rgba(15,23,42,.04);
}

.settings-card-head h2{
    margin:5px 0 6px;
}

.settings-card-head p{
    margin:0 0 20px;
    color:#667085;
    line-height:1.5;
}

.settings-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}

.settings-form-grid label{
    display:block;
}

.settings-form-grid label span{
    display:block;
    font-size:12px;
    font-weight:700;
    margin-bottom:6px;
}

.settings-form-grid input{
    width:100%;
    border:1px solid #d9dee7;
    border-radius:9px;
    padding:12px 13px;
    font:inherit;
    outline:none;
}

.settings-form-grid input:focus,
.settings-otp:focus{
    border-color:#d99a24;
    box-shadow:0 0 0 3px rgba(217,154,36,.12);
}

.settings-full{
    grid-column:1/-1;
}

.settings-card .primary-button{
    width:100%;
    margin-top:16px;
}

.settings-message{
    min-height:20px;
    margin-top:10px;
    font-size:13px;
    color:#667085;
}

.settings-status{
    padding:12px 14px;
    margin-bottom:18px;
    border-radius:10px;
    border:1px solid #f0d49a;
    background:#fff9ec;
    font-size:13px;
}

.settings-status strong{
    display:block;
    margin-bottom:4px;
}

.settings-otp-copy{
    margin-bottom:12px;
    color:#667085;
}

.settings-otp{
    width:100%;
    border:1px solid #d9dee7;
    border-radius:9px;
    padding:13px;
    text-align:center;
    font-size:27px;
    font-weight:800;
    letter-spacing:8px;
    outline:none;
}

@media(max-width:900px){

    .settings-grid{
        grid-template-columns:1fr;
    }
}

@media(max-width:600px){

    .settings-form-grid{
        grid-template-columns:1fr;
    }

    .settings-full{
        grid-column:auto;
    }

    .settings-card{
        padding:18px;
    }
}

/* Multi-company selector */
.company-switcher-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: 18px;
}

.company-switcher-wrap label {
    font-size: 12px;
    font-weight: 600;
    opacity: .7;
}

.company-switcher {
    min-width: 220px;
    max-width: 360px;
    padding: 9px 34px 9px 12px;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.company-switcher:disabled {
    opacity: .6;
    cursor: wait;
}

@media (max-width: 900px) {
    .company-switcher-wrap {
        margin-right: 8px;
    }

    .company-switcher-wrap label {
        display: none;
    }

    .company-switcher {
        min-width: 150px;
        max-width: 210px;
    }
}

@media (max-width: 620px) {
    .company-switcher-wrap {
        width: 100%;
        order: 3;
        margin: 8px 0 0;
    }

    .company-switcher {
        width: 100%;
        max-width: none;
    }
}

/* PASSWORD RESET */

.forgot-password-row {
    margin-top: 10px;
    text-align: right;
}

.forgot-password-link,
.password-reset-back {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.forgot-password-link:hover,
.password-reset-back:hover {
    text-decoration: underline;
}

.password-reset-panel {
    margin-top: 8px;
}

.password-reset-panel h3 {
    font-size: 26px;
    margin: 0 0 10px;
}

.password-reset-panel p {
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 20px;
}

.password-reset-back {
    display: block;
    margin: 20px auto 0;
}

.form-success {
    min-height: 22px;
    margin-top: 12px;
    color: #15803d;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* REQUEST CHAT UPGRADE 2026-10-01 */

.request-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.request-message {
    margin-bottom: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.request-message.customer {
    border-bottom-right-radius: 4px;
}

.request-message.staff {
    border-bottom-left-radius: 4px;
}

.request-reply-form {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.request-reply-form textarea {
    min-height: 72px;
    max-height: 180px;
    resize: vertical;
}

.request-chat-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 780px) {
    .request-messages {
        min-height: 260px;
        max-height: 390px;
        padding: 12px;
    }

    .request-reply-form textarea {
        min-height: 64px;
    }
}

/* REQUEST INBOX UPGRADE 2026-10-01 */

.request-list-item.unread {
    background: #fffdf5;
    border-left: 4px solid var(--accent);
}

.request-list-item.unread > strong {
    font-weight: 900;
}

.request-list-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.request-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--dark);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.request-last-message {
    margin: 8px 0 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-last-message span {
    color: var(--text);
    font-weight: 800;
}

@media (max-width: 780px) {
    .request-list-badges {
        justify-content: flex-start;
    }

    .request-last-message {
        font-size: 12px;
    }
}
