/* ===================================================
   PYQS Dashboard & Auth Styles
=================================================== */

/* Auth Forms */
.pyqs-auth-form { max-width: 420px; margin: 0 auto; padding: 32px; background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.pyqs-auth-form h2 { color: #0a2a66; font-size: 22px; margin-bottom: 20px; text-align: center; }
.pyqs-field { margin-bottom: 16px; }
.pyqs-field label { display: block; font-weight: 600; font-size: 13px; color: #444; margin-bottom: 5px; }
.pyqs-field input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; transition: border-color .2s; }
.pyqs-field input:focus { border-color: #0a2a66; box-shadow: 0 0 0 3px rgba(10,42,102,.08); }

/* Dashboard layout overrides */
body.page-template-page-dashboard,
body.page-template-page-exam-result {
    background: #f4f7fd;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Active menu highlight */
.pyqs-nav-active { color: #ffd700 !important; }

/* Paper cards */
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.paper-card {
    background: #fff; border-radius: 10px; padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.07); border-left: 4px solid #0a2a66;
    transition: transform .2s, box-shadow .2s;
}
.paper-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.paper-card h3 { font-size: 15px; color: #0a2a66; margin-bottom: 8px; }
.paper-card .meta { font-size: 12px; color: #888; margin-bottom: 12px; }
.paper-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.paper-card .tag { padding: 2px 8px; background: #e8f0ff; color: #0a2a66; border-radius: 4px; font-size: 11px; font-weight: 600; }
.paper-card .btn-start { display: block; text-align: center; background: #0a2a66; color: #fff; padding: 8px; border-radius: 6px; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; border: none; width: 100%; }
.paper-card .btn-start:hover { background: #1a3a7e; }

/* Exam archive hero */
.exam-hero { background: linear-gradient(135deg,#0a2a66 0%,#1a4080 100%); color: #fff; padding: 48px 24px; text-align: center; margin-bottom: 32px; }
.exam-hero h1 { font-size: 36px; font-weight: 700; color: #ffd700; margin-bottom: 8px; }
.exam-hero p { font-size: 16px; color: #cdd8f0; }

/* Breadcrumbs */
.pyqs-breadcrumbs { font-size: 13px; color: #888; margin-bottom: 20px; }
.pyqs-breadcrumbs a { color: #0a2a66; text-decoration: none; }
.pyqs-breadcrumbs a:hover { text-decoration: underline; }

/* Section badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-free    { background: #d4edda; color: #155724; }
.badge-premium { background: #fff3cd; color: #856404; }
.badge-new     { background: #d1ecf1; color: #0c5460; }

/* Notification snackbar */
.pyqs-snack {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #0a2a66; color: #fff; padding: 10px 24px; border-radius: 6px;
    font-size: 14px; z-index: 9999; animation: slideUp .3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
@keyframes slideUp { from { bottom: 0; opacity: 0; } to { bottom: 20px; opacity: 1; } }

/* Tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
    background: #222; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 11px;
    white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s;
    z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* Progress circle (CSS only) */
.progress-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: conic-gradient(#0a2a66 var(--pct), #e8edf7 var(--pct));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #0a2a66;
    position: relative;
}
.progress-circle::before {
    content: ''; position: absolute; inset: 8px;
    background: #fff; border-radius: 50%;
}
.progress-circle .pct-text { position: relative; z-index: 1; }

/* Skeleton loaders */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print styles for result */
@media print {
    .gate-exam-header, .gate-bottom-nav, .gate-palette-panel, .btn-submit-paper, .btn-calc { display: none !important; }
    .qr-body { display: block !important; }
    body { background: #fff !important; }
}
