/* ============================================================
   CABINET — AEY Lab
   Стили для страницы личного кабинета
   ============================================================ */

/* RESET for cabinet body */
.cabinet-body {
    display: block;
    background: #F1F5F9;
    min-height: 100vh;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-card {
    width: 480px;
    flex-shrink: 0;
    background: #fff;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.login-logo {
    margin-bottom: 40px;
}

.login-logo .logo {
    font-size: 1.25rem;
    color: var(--text);
}

.login-title {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrap>i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.input-icon-wrap input {
    padding-left: 44px !important;
    background: var(--bg-alt);
    width: 100%;
}

.toggle-pass {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    padding: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toggle-pass:hover {
    color: var(--blue);
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #DC2626;
    margin-bottom: 16px;
}

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 24px;
}

.login-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    background: var(--bg-alt);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.login-footer-note i {
    color: var(--blue);
    margin-top: 2px;
    flex-shrink: 0;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    width: fit-content;
}

.back-link:hover {
    color: var(--blue);
}

/* Right bg panel */
.login-bg-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.login-bg-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0, 50, 150, 0.7) 0%, rgba(0, 20, 60, 0.92) 100%);
}

.login-bg-text {
    position: relative;
    z-index: 2;
    padding: 60px;
    color: white;
}

.lbt-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    background: rgba(0, 87, 255, 0.3);
    border: 1px solid rgba(0, 87, 255, 0.5);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 24px;
}

.login-bg-text h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.login-bg-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* ============================================================
   CABINET DASHBOARD
   ============================================================ */
.cabinet-screen {
    flex-direction: column;
    min-height: 100vh;
    background: #F1F5F9;
}

/* CABINET HEADER */
.cab-header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cab-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.cab-header-inner .logo {
    flex-shrink: 0;
    color: var(--text);
    font-size: 1.15rem;
    text-decoration: none;
}

.cab-nav {
    display: flex;
    gap: 4px;
    margin-right: auto;
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 4px;
}

.cab-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 9px;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cab-nav-btn:hover {
    color: var(--text);
    background: white;
}

.cab-nav-btn.active {
    background: white;
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cab-nav-btn i {
    font-size: 0.85rem;
}

.cab-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cab-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #003ADD);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cab-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cab-user-name {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.cab-user-role {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cab-logout {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cab-logout:hover {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

/* MAIN */
.cab-main {
    flex: 1;
    padding: 32px 0;
}

.cab-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* TABS */
.cab-tab {
    display: none;
}

.cab-tab.active {
    display: block;
}

/* PAGE HEADER */
.cab-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.cab-title {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.cab-title span {
    color: var(--blue);
}

.cab-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* STATS ROW */
.cab-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.cab-stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.2s;
}

.cab-stat-card:hover {
    box-shadow: var(--shadow);
}

.cab-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cab-stat-icon.blue {
    background: #EEF3FF;
    color: var(--blue);
}

.cab-stat-icon.green {
    background: #F0FDF4;
    color: #16a34a;
}

.cab-stat-icon.orange {
    background: #FFF7ED;
    color: #EA580C;
}

.cab-stat-icon.purple {
    background: #F5F3FF;
    color: #7C3AED;
}

.cab-stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.cab-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* SECTION HEADER */
.cab-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cab-section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.cab-see-all {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: gap 0.2s;
}

.cab-see-all:hover {
    gap: 10px;
}

/* DOCS LIST */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.docs-list-full {
    gap: 10px;
}

.doc-item {
    background: white;
    border-radius: 14px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.25s;
}

.doc-item:hover {
    box-shadow: var(--shadow);
    border-color: #CBD5E1;
}

.doc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.doc-icon.pdf {
    background: #FEF2F2;
    color: #DC2626;
}

.doc-icon.doc {
    background: #EEF3FF;
    color: var(--blue);
}

.doc-icon.xls {
    background: #F0FDF4;
    color: #16a34a;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.doc-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.doc-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}

.doc-status.ready {
    background: #F0FDF4;
    color: #16a34a;
}

.doc-status.pending {
    background: #FFF7ED;
    color: #EA580C;
}

.doc-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.doc-download {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.doc-download:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.doc-size-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* FILTER BUTTONS */
.docs-filter {
    display: flex;
    gap: 6px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-muted);
}

.filter-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.filter-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

/* CLIENT MINI CARD */
.client-mini-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.cmc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text);
}

.cmc-row i {
    color: var(--blue);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

/* PROFILE */
.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 36px 28px;
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #003ADD);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.profile-name-big {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.profile-role-tag {
    padding: 5px 14px;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}

.profile-contact-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.pcl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-alt);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pcl-item i {
    color: var(--blue);
    width: 14px;
    text-align: center;
}

.profile-details-card {
    background: white;
    border-radius: 20px;
    padding: 36px;
    border: 1px solid var(--border);
}

.profile-details-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.pinfo-full {
    grid-column: span 2;
}

.pinfo-item label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.pinfo-val {
    padding: 12px 16px;
    background: var(--bg-alt);
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid var(--border);
    word-break: break-word;
}

.profile-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.profile-note i {
    color: var(--text-muted);
    margin-top: 2px;
    flex-shrink: 0;
}

.profile-note a {
    color: var(--blue);
    font-weight: 700;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1rem;
}

/* CAB FOOTER */
.cab-footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cab-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}

.cab-footer a:hover {
    color: var(--blue);
}

/* TOAST NOTIFICATION */
.toast-notify {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: var(--text);
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s;
}

.toast-notify.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notify i {
    color: #60a5fa;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .login-bg-panel {
        display: none;
    }

    .login-card {
        width: 100%;
        padding: 40px 32px;
    }

    .cab-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }

    .cab-header-inner {
        padding: 0 16px;
        gap: 16px;
    }

    .cab-nav {
        display: none;
    }

    /* show burger instead on mobile */
    .cab-container {
        padding: 0 16px;
    }

    .cab-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .cab-stat-card {
        padding: 18px;
    }

    .doc-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .doc-right {
        flex-wrap: wrap;
        gap: 10px;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .pinfo-full {
        grid-column: span 1;
    }

    .client-mini-card {
        flex-direction: column;
        gap: 16px;
    }
}