/* =====================================================
   YVY Admin Panel Styles
   ===================================================== */

body.admin-body { display: flex; min-height: 100vh; background-attachment: fixed; }

/* --- SIDEBAR --- */
.sidebar {
    width: 260px; height: 100vh; position: fixed; top: 0; left: 0; z-index: 200;
    background: rgba(8,18,38,0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; transition: transform 0.3s;
}
.sidebar-header {
    padding: 20px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.sidebar-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; }
.sidebar-title { font-size: 16px; font-weight: 700; color: #fff; font-family: 'Times New Roman', Times, serif; }
.sidebar-subtitle { font-size: 10px; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 400; color: var(--text-secondary);
    text-decoration: none; transition: all var(--transition); margin-bottom: 4px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active {
    background: linear-gradient(145deg, rgba(0,180,216,0.2), rgba(0,180,216,0.08));
    border: 1px solid rgba(0,180,216,0.2); color: rgba(180,235,255,0.95); font-weight: 500;
}
.sidebar-link-logout { color: rgba(255,150,150,0.7); }
.sidebar-link-logout:hover { background: rgba(255,71,87,0.1); color: rgba(255,150,150,0.95); }
.sl-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer {
    padding: 16px 20px; border-top: 1px solid var(--border-subtle);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.su-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(145deg, rgba(0,180,216,0.3), rgba(26,184,122,0.3));
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
}
.su-name { font-size: 13px; font-weight: 500; color: #fff; }
.su-role { font-size: 10px; color: var(--text-muted); }

/* --- MOBILE HEADER --- */
.mobile-header {
    display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 150;
    background: rgba(5,14,31,0.9); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle); height: 56px;
    padding: 0 16px; align-items: center; justify-content: space-between;
}
.hamburger {
    background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
    padding: 6px;
}
.mh-title { font-size: 15px; font-weight: 600; color: #fff; }
.mh-logout { font-size: 18px; text-decoration: none; }
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199;
}

/* --- ADMIN MAIN --- */
.admin-main {
    flex: 1; margin-left: 260px; padding: 32px; min-height: 100vh;
    position: relative; z-index: 1;
}

/* --- PAGE HEADER --- */
.page-header {
    margin-bottom: 28px;
    animation: slideUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.page-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--text-secondary); font-weight: 300; }

/* --- STAT CARDS --- */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);
    padding: 20px; transition: all var(--transition);
    animation: slideUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-light); }
.stat-icon { font-size: 28px; margin-bottom: 10px; }
.stat-value { font-size: 32px; font-weight: 800; margin-bottom: 4px;
    background: linear-gradient(90deg, #60c8f0, #5ecb3e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 400; letter-spacing: 0.3px; }

/* --- CONTENT CARD --- */
.content-card {
    background: var(--bg-card); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);
    padding: 24px; margin-bottom: 20px;
    animation: slideUp 0.5s 0.1s cubic-bezier(0.16,1,0.3,1) both;
}
.content-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* --- RECENT LIST --- */
.recent-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.recent-item:last-child { border-bottom: none; }
.recent-info { display: flex; align-items: center; gap: 12px; }
.recent-type-badge {
    padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 700;
    letter-spacing: 0.5px; background: rgba(0,180,216,0.15); color: rgba(180,235,255,0.9);
    border: 1px solid rgba(0,180,216,0.2);
}
.recent-details { display: flex; flex-direction: column; }
.recent-doc-num { font-size: 13px; font-weight: 600; font-family: 'Courier New', monospace; }
.recent-client { font-size: 11px; color: var(--text-muted); }
.recent-date { font-size: 11px; color: var(--text-muted); }

/* --- ACTIVITY LOG --- */
.activity-item {
    display: flex; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
    background: var(--accent-cyan);
}
.activity-text { font-size: 12px; color: var(--text-secondary); }
.activity-time { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* --- SERIAL SUGGESTION --- */
.serial-suggestion {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: var(--radius-sm);
    background: rgba(26,184,122,0.1); border: 1px solid rgba(26,184,122,0.2);
    font-size: 13px; color: rgba(160,255,190,0.9); margin-top: 6px;
}
.serial-suggestion code { font-weight: 700; font-family: 'Courier New', monospace; }

/* --- LOGIN PAGE --- */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 24px;
}
.login-card {
    width: 100%; max-width: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(48px) saturate(1.6); -webkit-backdrop-filter: blur(48px) saturate(1.6);
    border-radius: var(--radius-xxl); border: 1px solid var(--border-light);
    overflow: hidden; box-shadow: var(--shadow-card);
    animation: rise 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
.login-header { padding: 28px 26px 20px; text-align: center; border-bottom: 1px solid var(--border-subtle); }
.login-logo { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px; object-fit: contain; }
.login-title { font-size: 20px; font-weight: 700; font-family: 'Times New Roman', Times, serif; margin-bottom: 4px; }
.login-subtitle { font-size: 11px; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.login-body { padding: 24px 26px; }
.login-footer { padding: 0 26px 20px; text-align: center; }
.login-error {
    padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
    background: rgba(255,71,87,0.1); border: 1px solid rgba(255,71,87,0.2);
    color: rgba(255,180,180,0.9); font-size: 13px; text-align: center;
}
.login-btn {
    width: 100%; padding: 14px; border-radius: var(--radius-lg); border: none;
    background: linear-gradient(145deg, rgba(0,180,216,0.4), rgba(0,180,216,0.2));
    border: 1px solid rgba(80,210,240,0.3); color: rgba(180,235,255,0.95);
    font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(0,160,200,0.2);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,160,200,0.3); }
.login-btn:active { transform: scale(0.97); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* --- RESPONSIVE ADMIN --- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .mobile-header { display: flex; }
    .admin-main { margin-left: 0; padding: 72px 16px 24px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}