/* =====================================================
   RSK Attendance — Glass Liquid iOS Theme
   ===================================================== */

:root {
    --bg: #0a0a0f;
    --bg-elevated: rgba(255, 255, 255, 0.04);
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-strong: rgba(255, 255, 255, 0.14);
    --text: #f5f5f7;
    --text-secondary: rgba(245, 245, 247, 0.65);
    --text-muted: rgba(245, 245, 247, 0.4);
    --accent: #0a84ff;
    --accent-glow: rgba(10, 132, 255, 0.35);
    --accent-2: #5e5ce6;
    --accent-3: #30d158;
    --danger: #ff453a;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-full: 9999px;
    --blur: 24px;
    --nav-height: 64px;
    --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Liquid Background ---------- */
.liquid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: float 18s ease-in-out infinite;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #0a84ff 0%, transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #5e5ce6 0%, transparent 70%);
    top: 40%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #30d158 0%, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -10s;
    opacity: 0.3;
}

.blob-4 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #ff375f 0%, transparent 70%);
    top: 20%;
    left: 50%;
    animation-delay: -7s;
    opacity: 0.25;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.08); }
    66% { transform: translate(-20px, 25px) scale(0.95); }
}

/* ---------- Glass Utility ---------- */
.glass {
    background: var(--glass);
    backdrop-filter: blur(var(--blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
    border: 1px solid var(--glass-border);
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
}

.nav-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--glass-strong);
}

.nav-links a.nav-btn {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.nav-links a.nav-btn:hover,
.nav-links a.nav-btn.active {
    background: #0077ed;
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- Main ---------- */
.main-content {
    position: relative;
    z-index: 1;
    padding-top: var(--nav-height);
    min-height: calc(100vh - 200px);
}

/* ---------- Hero (Home) ---------- */
.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(10, 132, 255, 0.12);
    border: 1px solid rgba(10, 132, 255, 0.25);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-primary:hover {
    background: #0077ed;
    transform: translateY(-2px);
    box-shadow: 0 10px 32px var(--accent-glow);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: var(--glass-strong);
    transform: translateY(-2px);
}

/* ---------- Features ---------- */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 28px 24px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--glass-strong);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
    background: rgba(10, 132, 255, 0.15);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---------- Stats ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
}

.stat-card {
    text-align: center;
    padding: 28px 16px;
    border-radius: var(--radius);
}

.stat-card .num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---------- Apps Page ---------- */
.apps-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 20px 40px;
    text-align: center;
}

.apps-hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.apps-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 480px;
    margin: 0 auto 40px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.app-card {
    padding: 36px 28px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.app-card:hover {
    transform: translateY(-6px);
    background: var(--glass-strong);
}

.app-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(10,132,255,0.2), rgba(94,92,230,0.2));
    border: 1px solid var(--glass-border);
}

.app-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.app-card .version {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.app-card .btn {
    width: 100%;
    justify-content: center;
}

/* ---------- Login Page ---------- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height) - 220px);
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    border-radius: var(--radius);
}

.login-card .logo-wrap {
    text-align: center;
    margin-bottom: 28px;
}

.login-card .logo-wrap img {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 14px;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.login-error {
    background: rgba(255, 69, 58, 0.12);
    border: 1px solid rgba(255, 69, 58, 0.3);
    color: #ff6961;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 18px;
    text-align: center;
}

.login-success {
    background: rgba(48, 209, 88, 0.12);
    border: 1px solid rgba(48, 209, 88, 0.3);
    color: #30d158;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 18px;
    text-align: center;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 15px;
    margin-top: 8px;
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
    z-index: 1;
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.footer-brand strong {
    font-size: 1rem;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-bottom: 28px;
}

.footer-contact a,
.footer-contact span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--accent);
    font-weight: 500;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.92);
        backdrop-filter: blur(24px);
        padding: 20px;
        gap: 4px;
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 14px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 50px 20px 40px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
