/* ==========================================================
 * Yendor Cats — Admin Page Styles
 * Login card, dashboard, and admin-specific components
 * Uses site variables from variables.css (imported via main.css)
 * ========================================================== */

/* Admin page background */
.admin-page {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
    min-height: 100vh;
    padding-top: 80px; /* space for fixed navbar */
}

/* ==========================================================
 * Login Section
 * ========================================================== */
.admin-login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.login-card {
    background: rgba(20, 10, 10, 0.95);
    border: 1px solid rgba(228, 194, 0, 0.2);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-branding {
    text-align: center;
    margin-bottom: 2rem;
}

.login-branding .logo-image {
    width: 80px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
}

.login-branding h1 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.8rem;
    color: var(--color-white, #fff);
    margin-bottom: 0.25rem;
}

.login-branding h1 span {
    color: var(--accent-primary, #e4c200);
}

.login-branding .login-subtitle {
    color: var(--text-secondary, #F5F5F5);
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 0;
}

/* Login Form */
.admin-form .form-group {
    margin-bottom: 1.25rem;
}

.admin-form .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary, #F5F5F5);
    font-weight: 500;
    font-size: 0.95rem;
}

.admin-form .form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-white, #fff);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.admin-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.admin-form .form-group input:focus {
    outline: none;
    border-color: var(--accent-primary, #e4c200);
    box-shadow: 0 0 0 3px rgba(228, 194, 0, 0.15);
}

/* Remember Me */
.remember-me-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem !important;
}

.remember-me-group input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    accent-color: var(--accent-primary, #e4c200);
    cursor: pointer;
}

.remember-me-group label {
    cursor: pointer;
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
    opacity: 0.8;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--accent-primary, #e4c200) 0%, #b8941f 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228, 194, 0, 0.3);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-btn .btn-text,
.login-btn .btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn .btn-loading {
    display: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: inline-flex;
}

/* Spinner inside button */
.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin-small 0.6s linear infinite;
}

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

/* Inline Messages */
.login-message {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: none;
    animation: slideDown 0.3s ease;
}

.login-message.show {
    display: block;
}

.login-message.error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

.login-message.success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #69db7c;
}

.login-message.info {
    background: rgba(228, 194, 0, 0.1);
    border: 1px solid rgba(228, 194, 0, 0.2);
    color: var(--accent-secondary, #FFDF4F);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Back to Home link */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--text-secondary, #F5F5F5);
    opacity: 0.5;
    font-size: 0.85rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.login-footer a:hover {
    opacity: 1;
    color: var(--accent-primary, #e4c200);
}
/* ==========================================================
 * Change Password Section
 * ========================================================== */
.admin-change-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.password-hint {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #F5F5F5);
    opacity: 0.75;
}

/* ==========================================================
 * Admin Dashboard (shown after login)
 * ========================================================== */
.admin-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.dashboard-header h2 {
    color: var(--color-white, #fff);
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.dashboard-welcome {
    color: var(--text-secondary, #F5F5F5);
    opacity: 0.7;
    font-size: 1rem;
    margin-bottom: 0;
}

.dashboard-user-info {
    display: inline-block;
    background: rgba(228, 194, 0, 0.1);
    border: 1px solid rgba(228, 194, 0, 0.2);
    border-radius: 20px;
    padding: 0.3rem 1rem;
    color: var(--accent-primary, #e4c200);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Action Cards Grid */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(30, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: var(--color-white, #fff);
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-card:hover {
    border-color: var(--accent-primary, #e4c200);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.action-card.primary {
    border-color: rgba(228, 194, 0, 0.3);
    background: linear-gradient(135deg, rgba(228, 194, 0, 0.08) 0%, rgba(30, 15, 15, 0.8) 100%);
}

.action-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.action-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    color: var(--color-white, #fff);
}

.action-card p {
    font-size: 0.85rem;
    color: var(--text-secondary, #F5F5F5);
    opacity: 0.6;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Quick Stats on Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary, #e4c200);
    margin-bottom: 0.2rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary, #F5F5F5);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Logout Bar */
.dashboard-logout {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #F5F5F5);
    padding: 0.6rem 2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

/* ==========================================================
 * Auth-Aware Navbar Additions
 * ========================================================== */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-username {
    color: var(--accent-primary, #e4c200);
    font-size: 0.85rem;
    font-weight: 500;
}

.nav-logout-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary, #F5F5F5);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-logout-btn:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: #ff6b6b;
}

/* ==========================================================
 * Responsive
 * ========================================================== */
@media (max-width: 768px) {
    .admin-page {
        padding-top: 70px;
    }

    .login-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .login-branding h1 {
        font-size: 1.5rem;
    }

    .dashboard-actions {
        grid-template-columns: 1fr;
    }

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

    .action-card {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}
