/* css/style.css */
     @font-face {
                font-family: "CalSans"; 
                src: url("/fonts/CalSans-Regular.ttf") format("truetype");
                font-style: normal; 
                font-weight: normal; 
                }
     @font-face {
                font-family: "ArmGuard"; 
                src: url("/fonts/Armguard.ttf") format("truetype");
                font-style: normal; 
                font-weight: normal;
                }
    @font-face {
                font-family: "Agale"; 
                src: url("/fonts/Agale.otf") format("truetype");
                font-style: normal; 
                font-weight: normal; 
                }
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #2563eb;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --sidebar-width: 280px;
    --header-height: 64px;
    --sidebar-compact-width: 72px;
    --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*::-webkit-scrollbar {
            width: 7px;
            background-color: transparent;
            transition: all 1;
            height: 4px;
        }

        *::-webkit-scrollbar-thumb {
          background-color: var(--text-muted);
          border-radius: 4px;
        }

        *::-webkit-scrollbar-track {
          background-color: var(--bg-secondary);
            display: none;
        }

        *::-webkit-scrollbar-button:single-button {
          display: none;
          height: 0;
          width: 0;
        }

        *::-webkit-scrollbar-button {
          display: none;
          height: 0;
          width: 0;
        }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:'CalSans','Armguard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    font-weight:600;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
}


.verification-content {
    text-align: center;
}

.verification-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.verification-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.verification-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.verification-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.verification-help {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.verification-help p {
    margin: 0;
    color: var(--text-muted);
}

/* modal  */
.field-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

input.error {
    border-color: var(--error-color);
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.content {
    max-width: none !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(2px) saturate(0);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Field error styles */
.field-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

input.error {
    border-color: var(--error-color);
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Disable scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
}

/* Smooth transitions for buttons */
.btn {
    transition: all 0.2s ease;
}

.modal-close {
    transition: all 0.2s ease;
}
/* 2FA Wizard Styles */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-secondary);
}

.soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.disabled-method {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.disabled-method::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.method-option {
    position: relative;
}

.method-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.method-option {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.method-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.method-option.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.method-info h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.method-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.method-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.method-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.method-features li i {
    color: var(--success-color);
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.email-confirmation {
    text-align: center;
    padding: 2rem;
}

.confirmation-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.backup-codes-container {
    text-align: center;
}

.backup-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.backup-code {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid var(--border-color);
}

.backup-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-active {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.setup-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* PIN input styling */
#pin-code, #confirm-pin {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 8px;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .method-option {
        flex-direction: column;
        text-align: center;
    }
    
    .method-icon {
        align-self: center;
    }
    
    .backup-codes {
        grid-template-columns: 1fr;
    }
    
    .backup-actions {
        flex-direction: column;
    }
    
    .wizard-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .wizard-actions .btn {
        width: 100%;
    }
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
    transition: var(--sidebar-transition);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: var(--sidebar-transition);
    margin-left: var(--sidebar-width);
    min-width: 0; 
    width: calc(100% - var(--sidebar-width)); 
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
   /* max-width: 1900px;*/
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar-toggle i{
    font-size:1.5em;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 3px 6px;
    transition: all 0.4s ease;
    cursor: pointer;
    border-radius: 12px;
}

.logo-section:hover {
    background: var(--primary-color);
    color: white;
}

.logo-section:hover .brand-name, .logo-selection:hover .brand-name-mobi {
    color:white;
    transition: all 0.4s ease;
}

.brand-name-mobi {
    display:none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo {
    height: 32px;
    width: auto;
}

.logo-section i {
        font-size: 2rem;
}

.logo-ti {
        font-size: 3rem;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* User Menu */
.main-nav {
        position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-menu:hover {
    background-color: var(--bg-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.top-email {
    display:none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    font-size: 1rem;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
}

.dropdown-item.logout {
    color: var(--error-color);
}

.dropdown-item.logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.v1-notif-icon {
    display:flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    font-size: 2rem;
    border-radius:var(--border-radius);
}

.v1-notif-icon i {
    font-size: 1.5rem;
    color: #6b7280;
    transition: color 0.3s ease;
}

.v1-notif-icon:hover {
   color: #374151;
    background-color: var(--bg-secondary);
}

.v1-notif-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 16px;
    z-index: 1000;
    display: none;
}

.v1-notif-dropdown.show {
    display: block;
}

.v1-notif-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    color: #6b7280;
    font-size: 0.875rem;
    flex-direction: column;
    text-align: center;
}

.v1-notif-item i {
    font-size: 1.25rem;
    color: #9ca3af;
}

/* Auth Links */
.auth-links {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

/* Buttons */
.btn {
    font-family:'CalSans', 'Armguard';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn:disabled {
        opacity: 0.5;
} 
.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline i {
    font-size: 1.2rem;
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Sidebar Base Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--sidebar-transition);
    transform: translateX(0);
    overflow: hidden;
}

/* Compact Sidebar - ИСПРАВЛЕННЫЙ */
.sidebar.compact {
    width: var(--sidebar-compact-width);
}

.sidebar.compact .user-details,
.sidebar.compact .nav-title,
.sidebar.compact .nav-label,
.sidebar.compact .nav-url,
.sidebar.compact .status-text {
    display: none !important;
}

.sidebar.compact .nav-badge {
    position: absolute;
    top: 5px;
    right: 10px;
    padding: 0;
    transition: all 0.3s ease;
}
.sidebar.compact .sidebar-collapse i {
    transform: rotate(180deg);
}

.sidebar.compact .nav-item {
    justify-content: center;
    padding: 0.75rem;
    width: 100%;
}

.sidebar.compact .sidebar-header {
    padding: 0.5rem;
    justify-content: center;
}

.sidebar.compact .user-info {
    justify-content: center;
}

.sidebar.compact .sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar.compact .nav-section:not(.external-l) {
    order: 0;
}

.sidebar.compact .nav-section {
    margin-bottom: 8px;
    transition:all 0.3s ease;
}

.sidebar.compact .external-l {
    margin-top: auto;
    margin-bottom: 0;
    order: 1;
    transition:all 0.3s ease;
}

.sidebar.compact .external-l .nav-item {
    border-left: 5px solid transparent;
    transition: border-color 0.3s;
}

.sidebar.compact .external-l .nav-item:hover {
    border-left-color: var(--success-color);
    background: var(--bg-secondary);
}

/* Sidebar Header */
.sidebar-header {
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--sidebar-transition);
    min-height: 64px;
    box-sizing: border-box;
}

.user-info {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--sidebar-transition);
    width: 100%;
}

.user-info:hover {
    opacity: 0.5;
}

.user-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--sidebar-transition);
    transition: all 0.4s ease;
}

.user-avatar-large img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.sidebar.compact .user-avatar-large {
    max-width: 40px;
    height: 40px;
    margin: 0;
    transition: all 0.5s ease;
}

.sidebar.compact .user-avatar-large img {
    max-width: 39.99px;
    height: auto;
    transition: all 0.5s ease;
}

.user-details {
    flex: 1;
    min-width: 0;
    transition: var(--sidebar-transition);
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-collapse {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sidebar-collapse:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Sidebar Navigation - ИСПРАВЛЕННЫЙ */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden; /* Убираем горизонтальный скролл */
    transition: var(--sidebar-transition);
}

.nav-section {
    margin-bottom: 1rem;
    transition: var(--sidebar-transition);
}

.nav-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 1.5rem 0.5rem;
    letter-spacing: 0.05em;
    transition: var(--sidebar-transition);
    white-space: nowrap;
    overflow: hidden;
}



.nav-item {
    font-family:'CalSans', 'Armguard';
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    gap: 0.75rem;
    transition: var(--sidebar-transition);
    width: 100%;
    box-sizing: border-box;
}

.sidebar.compact .nav-item {
    padding: 0.75rem;
    justify-content: center;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-secondary);
    border-right: 3px solid var(--primary-color);
}

.nav-item.active::before {
    display: none;
}

.nav-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--sidebar-transition);
}

.nav-url {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
    transition: var(--sidebar-transition);
}

.nav-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    transition: var(--sidebar-transition);
}

.nav-item.external {
    color: var(--text-muted);
    position: relative;
}

.nav-item.external:hover {
    color: var(--text-primary);
}

.nav-item i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: var(--sidebar-transition);
}

.sidebar.compact .nav-item i {
    font-size: 1.25rem;
    margin: 0;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: var(--sidebar-transition);
}

.sidebar.compact .nav-item svg {
    width: 24px;
    height: 24px;
    margin: 0;
}


/* Sidebar Footer */
.sidebar-footer {
    cursor: pointer;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    transition: var(--sidebar-transition);
    min-height: 60px;
    box-sizing: border-box;
}

.sidebar-footer:hover {
    background: var(--primary-color);
    color:white;
}
.sidebar-footer:hover .system-text {
    color:white;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--sidebar-transition);
    width: 100%;height: 100%;
}

.sidebar.compact .system-status {
    justify-content: center;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.online {
    background: var(--success-color);
    animation: pulse 1.2s infinite;
}

.status-indicator.offline {
    background: var(--error-color);
}

.status-indicator.warning {
    background: var(--warning-color);
}

.status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--sidebar-transition);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Compact sidebar layout */
.sidebar.compact + .main-content {
    margin-left: var(--sidebar-compact-width);
    width: calc(100% - var(--sidebar-compact-width));
}

.sidebar.compact + .main-footer {
    margin-left: var(--sidebar-compact-width);
    width: calc(100% - var(--sidebar-compact-width));
}

/* Main Content Area */
.content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Footer */
.main-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    margin-left: var(--sidebar-compact-width);
    width: calc(100% - var(--sidebar-compact-width)); 
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h4,
.footer-section h5 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

.footer-bottom .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}


/* OAuth Specific Styles */
.oauth-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.auth-container {
    max-width: 800px;
    min-width: 40dvw;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-header h2 {
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.brand-header p {
    color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: flex;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    font-family:'Armguard';
    font-weight: 600;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* App Card */
.app-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.app-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.app-info h3 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.app-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Permissions */
.permissions {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.permissions h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.permissions ul {
    list-style: none;
}

.permissions li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* User Info */
.user-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.actions .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
   /* margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);*/
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Auth Pages */


.auth-header {
    display:flex;
    justify-items:center;
    text-align: center;
    flex-direction: column;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--primary-color);
}

.auth-logo {
    height: 48px;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    margin-bottom: 1.5rem;
}

.btn-full {
    width: 100%;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    background: var(--bg-primary);
    padding: 0 1rem;
    position: relative;
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.icon-google,
.icon-facebook {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.icon-google {
    background: transparent;
    color: white;
}

.icon-facebook {
    background: transparent;
    color: white;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    margin: 0;
}

.auth-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.auth-footer a:hover {
    color: var(--primary-color);
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1;
}

.error-page h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* API Response Styles */
.api-response {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Rate Limit Styles */
.rate-limit {
    background: var(--warning-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    text-align: center;
}

.rate-limit h4 {
    margin: 0 0 0.5rem 0;
}

.rate-limit p {
    margin: 0;
    font-size: 0.875rem;
}

/* Кастомные чекбоксы */
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1.4;
}

.checkbox:hover {
    color: var(--text-primary);
}

.checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox .checkmark {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-top: 0.125rem;
}

/* Состояние: наведение */
.checkbox:hover .checkmark {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

/* Состояние: фокус */
.checkbox input:focus + .checkmark {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-secondary);
}

/* Состояние: checked */
.checkbox input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Галочка для checked состояния */
.checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 1;
}

/* Состояние: disabled */
.checkbox input:disabled + .checkmark {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.checkbox input:disabled:checked + .checkmark {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

.checkbox input:disabled ~ span {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Состояние: indeterminate (неопределенное) */
.checkbox input:indeterminate + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox input:indeterminate + .checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 2px;
    background: white;
    transform: translate(-50%, -50%);
    opacity: 1;
}

/* Анимация при изменении состояния */
.checkbox .checkmark {
    animation: checkmark-pulse 0.2s ease;
}

@keyframes checkmark-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Вариации размеров */
.checkbox.size-sm {
    font-size: 0.75rem;
}

.checkbox.size-sm .checkmark {
    width: 14px;
    height: 14px;
    min-width: 14px;
}

.checkbox.size-sm input:checked + .checkmark::after {
    width: 3px;
    height: 6px;
    border-width: 0 1.5px 1.5px 0;
}

.checkbox.size-lg {
    font-size: 1rem;
}

.checkbox.size-lg .checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
}

.checkbox.size-lg input:checked + .checkmark::after {
    width: 5px;
    height: 10px;
    border-width: 0 2.5px 2.5px 0;
}

/* Вариации цветов */
.checkbox.success input:checked + .checkmark {
    background: var(--success-color);
    border-color: var(--success-color);
}

.checkbox.warning input:checked + .checkmark {
    background: var(--warning-color);
    border-color: var(--warning-color);
}

.checkbox.error input:checked + .checkmark {
    background: var(--error-color);
    border-color: var(--error-color);
}

/* Группа чекбоксов */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-group.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Только для чтения */
.checkbox.readonly .checkmark {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.checkbox.readonly input:checked + .checkmark {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s forwards;
    transform: translateX(400px);
    opacity: 0;
}

.notification.show {
    animation: slideInRight 0.3s ease forwards;
}

.notification.hide {
    animation: slideOutRight 0.3s ease forwards;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.notification i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-success i {
    color: var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-error i {
    color: var(--error-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-warning i {
    color: var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

.notification-info i {
    color: var(--primary-color);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Progress bar for notifications with auto-close */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progressBar 3s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    .brand-name {display:none;}
    .brand-name-mobi {display:flex;}
    .sidebar.mobile-open .external-l {
        margin-top: 0;
        order: 0;
    }
    
    .sidebar.mobile-open .sidebar-nav {
        display: block;
    }
    
    .main-footer {
        margin-left:0;
        width: 100%;
    }
    
    .sidebar-collapse {
        display:flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    /* Overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar.mobile-open + .sidebar-overlay {
        display: block;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .header-container {
        padding: 0 0.4rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .oauth-container,
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .top-email {
        display: none;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Desktop - скрываем toggle на больших экранах */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: nsone;
    }
}