/* ==========================================================================
   Khushi Digital Library - Main Public Stylesheet
   CMD: Suneel Yadav | Created by: Rayal Infotech
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --secondary: #0f172a;
    --accent: #10b981;
    --accent-gold: #f59e0b;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 14px -1px rgba(0,0,0,0.08), 0 2px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 6px 12px -3px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--secondary);
}

/* Top Announcement Bar */
.top-notice-bar {
    background: linear-gradient(90deg, #1e1b4b 0%, #312e81 100%);
    color: #e0e7ff;
    font-size: 0.85rem;
    padding: 7px 0;
}
.top-notice-bar a {
    color: #a5b4fc;
    text-decoration: none;
}
.top-notice-bar a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Navbar */
.navbar-custom {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    padding: 14px 0;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #312e81 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}
.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    line-height: 1.1;
    margin: 0;
}
.brand-subtitle {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
}

.nav-link {
    font-weight: 600;
    font-size: 0.94rem;
    color: #334155 !important;
    padding: 8px 14px !important;
    transition: all 0.2s ease;
    border-radius: 8px;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: rgba(79, 70, 229, 0.08);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    transition: all 0.25s ease;
}
.btn-primary-custom:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-outline-custom {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 10px;
    background: transparent;
    transition: all 0.25s ease;
}
.btn-outline-custom:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 80px 0 100px;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12) 0%, rgba(248, 250, 252, 0) 60%),
                radial-gradient(circle at 10% 80%, rgba(16, 185, 129, 0.08) 0%, rgba(248, 250, 252, 0) 50%);
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 20px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}
.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 22px;
}
.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 34px;
    max-width: 580px;
}

/* Hero Feature Cards */
.hero-card-preview {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
}
.hero-floating-stat {
    position: absolute;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

/* Features Grid */
.feature-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.3);
}
.feature-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}
.icon-indigo { background: #e0e7ff; color: var(--primary); }
.icon-emerald { background: #d1fae5; color: var(--accent); }
.icon-amber { background: #fef3c7; color: var(--accent-gold); }
.icon-sky { background: #e0f2fe; color: #0284c7; }
.icon-rose { background: #ffe4e6; color: #e11d48; }
.icon-purple { background: #f3e8ff; color: #9333ea; }

/* CMD Card */
.cmd-profile-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cmd-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category & Book Cards */
.book-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.book-card-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.book-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Status Badges */
.badge-status {
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-paid {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-partial {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-pending {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.badge-overdue {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 25px;
    border-top: 1px solid #1e293b;
}
.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: #ffffff;
}
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 25px;
    margin-top: 40px;
    font-size: 0.88rem;
}
.creator-pill {
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(79, 70, 229, 0.4);
    color: #c7d2fe;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* Print Styles for Receipts and ID Cards */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .no-print, .site-header, .site-footer, .btn, .admin-sidebar, .admin-topbar {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
    .receipt-container, .id-card-container {
        box-shadow: none !important;
        border: 1px solid #333333 !important;
        margin: 0 auto !important;
        max-width: 100% !important;
    }
}
