/* ============================================
   Compact Login Page CSS - PC Optimized
   - Smaller elements, more information density
   - Theme: Light / Dark / System
   ============================================ */

:root {
    /* Theme Colors - Default (Light Mode) */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1d29;
    --text-secondary: #5a5f73;
    --border-color: rgba(0, 0, 0, 0.08);

    /* Accent Colors */
    --primary-color: #4285f4;
    --primary-gradient: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);

    /* Glass-morphism - Light Mode */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
body[data-theme="dark"] {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d29;
    --text-primary: #e4e6eb;
    --text-secondary: #b8bac3;
    --border-color: rgba(255, 255, 255, 0.1);

    --glass-bg: rgba(26, 29, 41, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* System preference for dark mode */
@media (prefers-color-scheme: dark) {
    body[data-theme="system"] {
        --bg-primary: #0f1117;
        --bg-secondary: #1a1d29;
        --text-primary: #e4e6eb;
        --text-secondary: #b8bac3;
        --border-color: rgba(255, 255, 255, 0.1);

        --glass-bg: rgba(26, 29, 41, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Pattern - Subtle */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, var(--primary-color) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--primary-color) 0%, transparent 50%);
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Login Page - PC COMPACT
   ============================================ */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px 32px; /* PC: Much smaller padding */
    max-width: 400px; /* PC: Narrower */
    width: 100%;
    box-shadow: var(--shadow-md);
    text-align: center;
    animation: fadeInUp 0.8s ease;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo {
    margin-bottom: 20px; /* PC: Smaller margin */
    display: flex;
    justify-content: center;
    animation: scaleIn 0.6s ease 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logo svg {
    width: 48px; /* PC: Smaller logo */
    height: 48px;
    filter: drop-shadow(0 4px 12px rgba(66, 133, 244, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-box h1 {
    font-size: 22px; /* PC: Much smaller */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 13px; /* PC: Smaller */
    margin-bottom: 24px;
    font-weight: 400;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.login-info {
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.login-info p {
    color: var(--text-secondary);
    font-size: 12px; /* PC: Smaller */
    line-height: 1.5;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px; /* PC: Much smaller */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: #3c4043;
    font-size: 14px; /* PC: Smaller */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.google-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(102, 126, 234, 0.1));
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.google-btn:hover::before {
    width: 400px;
    height: 400px;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-btn:active {
    transform: translateY(0);
}

.google-btn svg, .google-btn img {
    width: 18px; /* PC: Smaller icon */
    height: 18px;
    position: relative;
    z-index: 1;
}

.google-btn span {
    position: relative;
    z-index: 1;
}

.access-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease 0.7s both;
}

.access-info p {
    color: var(--text-secondary);
    font-size: 11px; /* PC: Smaller */
    margin-bottom: 12px;
    font-weight: 500;
}

.access-info ul {
    list-style: none;
    padding: 0;
}

.access-info li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px; /* PC: Smaller */
    margin: 6px 0;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px; /* PC: Smaller */
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.access-info li:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
}

/* ============================================
   Error Page - PC COMPACT
   ============================================ */

.error-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    animation: shake 0.6s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.error-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 12px rgba(245, 87, 108, 0.4));
}

.error-message {
    color: #fff;
    font-size: 14px; /* PC: Smaller */
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.5;
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.2), rgba(240, 147, 251, 0.2));
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(245, 87, 108, 0.3);
}

.back-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px; /* PC: Smaller */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px; /* PC: Smaller */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.back-btn:hover::before {
    width: 300px;
    height: 300px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.back-btn:active {
    transform: translateY(0);
}

/* ============================================
   Dashboard Styles (Legacy Support) - PC COMPACT
   ============================================ */

.dashboard {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 24px; /* PC: Smaller */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-left h1 {
    font-size: 18px; /* PC: Smaller */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px; /* PC: Smaller */
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px; /* PC: Smaller */
}

.user-email {
    color: var(--text-secondary);
    font-size: 11px; /* PC: Smaller */
}

.logout-btn {
    padding: 8px 16px; /* PC: Smaller */
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 12px; /* PC: Smaller */
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px; /* PC: Smaller */
}

.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h2 {
    font-size: 24px; /* PC: Smaller */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 14px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* PC: Smaller min */
    gap: 16px; /* PC: Smaller gap */
    margin-bottom: 24px;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px; /* PC: Smaller */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-icon {
    width: 44px; /* PC: Smaller */
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.card h3 {
    font-size: 16px; /* PC: Smaller */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.card p {
    color: var(--text-secondary);
    font-size: 12px; /* PC: Smaller */
    margin-bottom: 12px;
    line-height: 1.5;
}

.card-btn {
    width: 100%;
    padding: 8px 16px; /* PC: Smaller */
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px; /* PC: Smaller */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.info-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px; /* PC: Smaller */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
    font-size: 18px; /* PC: Smaller */
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.info-grid {
    display: grid;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0; /* PC: Smaller */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 12px; /* PC: Smaller */
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-size: 13px; /* PC: Smaller */
    font-weight: 600;
}

.status-active {
    color: #00f2fe;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* ============================================
   MOBILE RESPONSIVE (>768px = Touch-friendly)
   ============================================ */

@media (max-width: 768px) {
    .login-box {
        padding: 36px 28px; /* Mobile: Larger */
    }

    .login-box h1 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 15px;
    }

    .google-btn {
        padding: 14px 28px; /* Mobile: Larger */
        font-size: 16px;
        min-height: 48px;
    }

    .google-btn svg, .google-btn img {
        width: 22px;
        height: 22px;
    }

    .access-info p {
        font-size: 13px;
    }

    .access-info li {
        font-size: 12px;
        padding: 10px 14px;
    }

    .navbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }

    .main-content {
        padding: 20px;
    }

    .welcome-section h2 {
        font-size: 24px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 20px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
.google-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}
