/* 
 * Sistem Informasi Perpustakaan & OPAC
 * Theme: Soft Orange & Crisp White
 * Interactive & Animated Styles
 */

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

:root {
    --primary-orange: #FF823A;
    --primary-orange-hover: #F2691B;
    --primary-orange-dark: #D4540C;
    --orange-50: #FFF9F5;
    --orange-100: #FFF0E5;
    --orange-200: #FFE3D1;
    --orange-300: #FFC5A3;
    --orange-400: #FFA470;
    --orange-500: #FF823A;
    --orange-600: #F2691B;
    
    --bg-page: #FFFBF8;
    --bg-surface: #FFFFFF;
    --bg-subtle: #FFF5EE;
    
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    --border-soft: #FDE8D7;
    --border-card: #F1DFD1;
    
    --shadow-soft: 0 4px 20px -2px rgba(255, 130, 58, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 14px 30px -4px rgba(255, 130, 58, 0.18), 0 6px 12px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 25px rgba(255, 130, 58, 0.35);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: clip;
    min-height: 100vh;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes pulseSoft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fadeIn var(--transition-smooth) forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: floatSlow 4s ease-in-out infinite;
}

.animate-pulse-soft {
    animation: pulseSoft 2.5s ease-in-out infinite;
}

/* Glassmorphism & Cards */
.bg-soft-orange {
    background-color: var(--orange-100) !important;
}

.bg-orange-gradient {
    background: linear-gradient(135deg, #FF9549 0%, #FF6F1C 100%) !important;
    color: #ffffff !important;
}

.bg-soft-gradient {
    background: linear-gradient(180deg, #FFF9F5 0%, #FFFFFF 100%);
}

.card-custom {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--orange-300);
}

.card-hover-lift:hover {
    transform: translateY(-5px);
}

/* Custom Typography & Badges */
.text-orange-main {
    color: var(--primary-orange) !important;
}

.badge-orange-soft {
    background-color: var(--orange-100);
    color: var(--orange-600);
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--orange-200);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-success-soft {
    background-color: #ECFDF5;
    color: #059669;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid #A7F3D0;
    font-size: 0.78rem;
}

.badge-danger-soft {
    background-color: #FEF2F2;
    color: #DC2626;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid #FECACA;
    font-size: 0.78rem;
}

.badge-warning-soft {
    background-color: #FFFBEB;
    color: #D97706;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid #FDE68A;
    font-size: 0.78rem;
}

.badge-secondary-soft {
    background-color: #F1F5F9;
    color: #475569;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid #CBD5E1;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Custom Buttons */
.btn-orange {
    background: linear-gradient(135deg, #FF9549 0%, #FF701E 100%);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.4rem;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 112, 30, 0.25);
    transition: all var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
}

.btn-orange:hover {
    background: linear-gradient(135deg, #FF823A 0%, #E65A0D 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 112, 30, 0.35);
}

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

.btn-orange-outline {
    background: #ffffff;
    color: var(--primary-orange) !important;
    border: 1.5px solid var(--primary-orange);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.3rem;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
}

.btn-orange-outline:hover {
    background: var(--orange-50);
    border-color: var(--primary-orange-hover);
    color: var(--primary-orange-hover) !important;
    transform: translateY(-2px);
}

.btn-orange-light {
    background: var(--orange-100);
    color: var(--primary-orange-hover) !important;
    border: 1px solid var(--orange-200);
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}

.btn-orange-light:hover {
    background: var(--orange-200);
    color: var(--primary-orange-dark) !important;
}

/* Custom Form Inputs */
.form-control-custom,
.form-select-custom {
    background-color: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    color: var(--text-primary);
    font-size: 0.93rem;
    width: 100%;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 130, 58, 0.18);
    background-color: #FFFFFF;
}

/* Modern Navbar */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0.85rem 0;
    box-shadow: 0 2px 15px rgba(255, 130, 58, 0.05);
}

.navbar-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: #1E293B;
    text-decoration: none;
}

.brand-icon-box {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #FF9549 0%, #FF701E 100%);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(255, 112, 30, 0.3);
}

/* Sidebar for Staff & Member Dashboard */
.layout-wrapper {
    display: flex;
    min-height: calc(100vh - 72px);
    position: relative;
}

.sidebar-custom {
    width: 270px;
    background: #FFFFFF;
    border-right: 1px solid var(--border-soft);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    align-self: flex-start;
    transition: all var(--transition-smooth);
    scrollbar-width: thin;
    scrollbar-color: var(--orange-300) transparent;
}

.sidebar-custom::-webkit-scrollbar {
    width: 5px;
}

.sidebar-custom::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-custom::-webkit-scrollbar-thumb {
    background: var(--orange-200);
    border-radius: 10px;
}

.sidebar-custom::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    background: var(--bg-page);
    min-width: 0;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
    transition: all var(--transition-fast);
}

.nav-link-custom:hover {
    background-color: var(--orange-50);
    color: var(--primary-orange);
    transform: translateX(4px);
}

.nav-link-custom.active {
    background: linear-gradient(135deg, #FFF0E5 0%, #FFE3D1 100%);
    color: var(--orange-600);
    font-weight: 700;
    border-left: 4px solid var(--primary-orange);
}

.sidebar-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 1.25rem 0 0.5rem 0.75rem;
}

/* Stat Cards */
.stat-card {
    padding: 1.4rem;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon-orange {
    background: var(--orange-100);
    color: var(--primary-orange);
}

.stat-icon-green {
    background: #ECFDF5;
    color: #059669;
}

.stat-icon-blue {
    background: #EFF6FF;
    color: #2563EB;
}

.stat-icon-purple {
    background: #F5F3FF;
    color: #7C3AED;
}

/* OPAC Book Card */
.book-card {
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--orange-300);
}

.book-cover-container {
    height: 250px;
    background: linear-gradient(135deg, #FFF7F0 0%, #FFE9DC 50%, #FED7AA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
}

.book-cover-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none !important;
    transition: transform var(--transition-smooth);
}

.book-card:hover .book-cover-img {
    transform: scale(1.03);
}

/* Tables Modern */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background-color: var(--orange-50);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.9rem 1.1rem;
    border-bottom: 2px solid var(--border-soft);
}

.table-custom tbody td {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-primary);
    font-size: 0.91rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover td {
    background-color: #FFFDFB;
}

/* Hero Section */
.hero-banner {
    background: #FFF9F5;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 3.5rem 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: none !important;
}

.hero-slideshow-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.2s ease-in-out, transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.0);
}

.hero-slideshow-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 248, 240, 0.32) 50%, rgba(255, 240, 225, 0.42) 100%);
    border-radius: inherit;
}

.hero-banner::before {
    display: none;
}
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 130, 58, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* Print Specific Styling */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .no-print,
    .navbar-custom,
    .sidebar-custom,
    footer,
    .btn {
        display: none !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .card-custom {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
