/* ========================================
   LOKPANCHAYAT LIBRARY MANAGEMENT SYSTEM
   Premium Professional Theme
   ======================================== */

:root {
    /* Primary Colors - Modern Blue Gradient */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Secondary Colors */
    --secondary: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 15px;
}

.bg-body {
    background: var(--gray-50) !important;
}

/* ========================================
   TRIAL LICENSE BANNER
   ======================================== */

.trial-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1040;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.trial-banner .trial-icon {
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.trial-banner a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 8px;
    transition: var(--transition);
}

.trial-banner a:hover {
    color: #fbbf24;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.app-header {
    background: white !important;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    color: var(--gray-900) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.brand-logo:hover {
    transform: rotate(5deg) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.brand-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: var(--gray-100);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.user-initial {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow);
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */

.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

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

.card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ========================================
   DASHBOARD STATS
   ======================================== */

.dashboard-stat {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.dashboard-stat:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.dashboard-stat:hover::before {
    width: 100%;
    opacity: 0.05;
}

.dashboard-stat h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0.5rem 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-soft {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 12px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    border-radius: var(--radius);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* ========================================
   FORMS
   ======================================== */

.form-control,
.form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    transition: var(--transition);
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 14px;
}

/* ========================================
   TABLES
   ======================================== */

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--gray-50);
    box-shadow: var(--shadow-sm);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */

.search-container {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.search-input-group {
    position: relative;
}

.search-input-group input {
    padding-left: 2.75rem;
    font-size: 15px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
}

/* ========================================
   MODALS
   ======================================== */

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--gray-900);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ========================================
   BADGES & LABELS
   ======================================== */

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-available {
    background: #d1fae5;
    color: #065f46;
}

.status-available::before {
    background: #10b981;
}

.status-issued {
    background: #fef3c7;
    color: #92400e;
}

.status-issued::before {
    background: #f59e0b;
}

.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-overdue::before {
    background: #ef4444;
}

/* ========================================
   BOOK COPY BOXES
   ======================================== */

.book-copies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.book-copy-box {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.book-copy-box:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.book-copy-box.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.copy-number {
    font-weight: 700;
    font-size: 18px;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.copy-barcode {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */

.alert {
    border-radius: var(--radius-lg);
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ========================================
   LOADING & ANIMATIONS
   ======================================== */

.spinner-border {
    animation: spin 1s linear infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   FOOTER
   ======================================== */

.app-footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    margin-top: auto;
    font-size: 14px;
    color: var(--gray-600);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.02);
}

.app-footer .badge {
    transition: var(--transition);
}

.app-footer .badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.app-footer .bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

.app-footer a {
    transition: var(--transition);
}

.app-footer a:hover {
    color: var(--primary) !important;
}

.app-footer .bi {
    font-size: 14px;
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .dashboard-stat h2 {
        font-size: 2rem;
    }

    .book-copies-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .trial-banner {
        font-size: 12px;
        padding: 8px 0;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: var(--transition);
}

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

/* ========================================
   CHECKBOX STYLING
   ======================================== */

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Select all checkbox in table header */
.select-all-checkbox {
    width: 1.5rem;
    height: 1.5rem;
}