/* Login Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10001;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface, #ffffff);
    padding: 30px;
    border-radius: var(--radius-lg, 18px);
    box-shadow: var(--shadow, 0 8px 24px rgba(17, 24, 39, 0.08));
    z-index: 10002;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border, #e5e7eb);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--muted, #6b7280);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text, #111827);
}

.modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: var(--brand-deep, #052c3e);
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--muted, #6b7280);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: var(--surface, #ffffff);
    color: var(--text, #111827);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary, #0892d2);
    box-shadow: var(--focus-ring, 0 0 0 4px rgba(8, 146, 210, 0.18));
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md, 14px);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--brand-primary, #0892d2);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-primary-2, #0c5374);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 146, 210, 0.22);
}

.btn-block {
    width: 100%;
    display: block;
}

.modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #e5e7eb);
    text-align: center;
}

.modal-footer .link {
    display: block;
    margin: 8px 0;
    color: var(--muted, #6b7280);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.modal-footer .link:hover {
    color: var(--brand-primary, #0892d2);
}

.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.10);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.20);
}

.alert-success {
    background: rgba(34, 197, 94, 0.10);
    color: #14532d;
    border: 1px solid rgba(34, 197, 94, 0.22);
}

/* User Menu Styles */
.user-menu {
    margin-top: 20px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: var(--surface-2, #f3f4f6);
    border-radius: var(--radius-md, 14px);
    text-decoration: none;
    color: var(--text, #111827);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    border: 1px solid var(--border, #e5e7eb);
}

.user-menu-item:hover {
    background: var(--surface, #ffffff);
    border-left-color: var(--brand-primary, #0892d2);
    transform: translateX(5px);
}

.user-menu-item i {
    font-size: 20px;
    color: var(--brand-primary, #0892d2);
    width: 25px;
    text-align: center;
}

.user-menu-item span {
    font-size: 15px;
    font-weight: 500;
}

.user-menu-item.logout {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--danger, #ef4444);
    border-color: rgba(239, 68, 68, 0.20);
}

.user-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.12);
}

.user-menu-item.logout i {
    color: var(--danger, #ef4444);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 20px;
    }

    .form-control {
        padding: 10px 12px;
    }

    .user-menu-item {
        padding: 12px 15px;
    }

    .user-menu-item span {
        font-size: 14px;
    }
}

html[data-theme='dark'] .modal-content {
    background: var(--surface, #ffffff);
    color: var(--text, #111827);
    box-shadow: var(--shadow, 0 8px 24px rgba(17, 24, 39, 0.08));
    border-color: var(--border, #e5e7eb);
}

html[data-theme='dark'] .modal-close {
    color: #6b7280;
}

html[data-theme='dark'] .modal-close:hover {
    color: #ffffff;
}

html[data-theme='dark'] .form-control {
    background: var(--surface, #ffffff);
    border-color: var(--border, #e5e7eb);
    color: var(--text, #111827);
}

html[data-theme='dark'] .form-control:focus {
    border-color: var(--brand-primary, #0892d2);
    box-shadow: var(--focus-ring, 0 0 0 4px rgba(8, 146, 210, 0.18));
}

html[data-theme='dark'] .modal-footer .link {
    color: #9ca3af;
}

html[data-theme='dark'] .modal-footer .link:hover {
    color: var(--brand-primary, #0892d2);
}

html[data-theme='dark'] .alert-error {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

html[data-theme='dark'] .alert-success {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

html[data-theme='dark'] .user-menu-item {
    background: var(--surface-2, #f3f4f6);
    color: var(--text, #111827);
    border-color: var(--border, #e5e7eb);
}

html[data-theme='dark'] .user-menu-item:hover {
    background: var(--surface, #ffffff);
}

html[data-theme='dark'] .user-menu-item.logout {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.20);
}

html[data-theme='dark'] .user-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.16);
}
