/* 
 * Yozgat Bozok University Library Automation System Stylesheet
 * Brand Identity Colors: Bozok Red (#A31D1D), Navy Blue (#0F172A), Slate Gray
 */

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

:root {
    --primary: #A31D1D;
    --primary-hover: #801212;
    --primary-light: #FDF2F2;
    --dark: #0F172A;
    --dark-sidebar: #1E293B;
    --dark-hover: #334155;
    --light-bg: #F8FAFC;
    --light-card: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    --border-color: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--dark);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--light-bg);
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Core Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-container.public-container {
    flex-direction: column;
}

.public-container .main-content {
    flex: 1;
}

.main-content {
    flex: 1;
    padding: 30px;
    margin-left: 260px;
    transition: var(--transition-normal);
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Full screen adjustment for login page */
.fullscreen-mode .main-content {
    margin-left: 0;
    padding: 0;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background-color: var(--dark-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-mobile-header,
.sidebar-backdrop {
    display: none;
}

.login-mobile-sidebar {
    display: none;
}

.public-mobile-header,
.public-mobile-sidebar {
    display: none;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo svg,
.sidebar-logo img {
    width: 40px;
    height: 40px;
}

.sidebar-logo-text h2 {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.sidebar-logo-text span {
    color: #94A3B8;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    flex: 1;
    padding: 24px 12px;
    list-style: none;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 6px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #94A3B8;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition-fast);
}

.sidebar-menu a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-menu a:hover {
    color: var(--text-light);
    background-color: var(--dark-hover);
}

.sidebar-menu li.active a {
    color: var(--text-light);
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(163, 29, 29, 0.3);
}

.sidebar-user {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid rgba(255,255,255,0.2);
}

.sidebar-user-details h4 {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-user-details span {
    color: #64748B;
    font-size: 11px;
}

.sidebar-logout-btn {
    color: #94A3B8;
    font-size: 16px;
    transition: var(--transition-fast);
    padding: 8px;
    border-radius: 8px;
}

.sidebar-logout-btn:hover {
    color: #EF4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Header & Top Bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.page-title p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.book-list-topbar {
    display: grid;
    gap: 20px;
    padding: 23px 26px 18px;
    margin-bottom: 24px;
    border: 1px solid #E8EAF0;
    border-radius: 18px;
    background: linear-gradient(115deg, #FFFFFF 0%, #FFFFFF 68%, #FFF8F6 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.book-list-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.book-list-heading-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid #F3DADA;
    border-radius: 16px;
    background: linear-gradient(145deg, #FFF8F7, #FDECEC);
    color: var(--primary);
    font-size: 23px;
}

.book-list-copy {
    min-width: 0;
}

.book-list-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.book-list-copy h1 {
    font-size: 26px;
    line-height: 1.2;
}

.book-list-copy p {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.5;
}

.book-list-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #EEF0F4;
}

.book-list-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.book-list-topbar .btn {
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.book-list-topbar .btn-secondary {
    color: #475569;
    border-color: #E7EAF0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
}

.book-list-topbar .btn-secondary:hover {
    color: var(--dark);
    border-color: #CBD5E1;
    background: #F8FAFC;
    transform: translateY(-1px);
}

.book-list-topbar .btn i {
    font-size: 13px;
}

.book-list-icon-pdf {
    color: #EF4444;
}

.book-list-icon-excel {
    color: #107C41;
}

.book-list-icon-json {
    color: #3B82F6;
}

.book-list-icon-sql {
    color: #D97706;
}

.book-list-action-divider {
    width: 1px;
    height: 25px;
    margin: 0 3px;
    background: #E2E8F0;
}

.book-list-topbar .book-list-import {
    color: #166534;
    border-color: #BBE7CB;
    background: #F1FAF4;
}

.book-list-topbar .book-list-import:hover {
    color: #14532D;
    border-color: #86D6A2;
    background: #E7F7EC;
}

.book-list-topbar .book-list-add {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 17px;
    box-shadow: 0 5px 12px rgba(163, 29, 29, 0.16);
}

.book-list-topbar .book-list-add:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .book-list-topbar {
        padding: 20px;
    }

    .book-list-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .book-list-tools {
        width: 100%;
    }

    .book-list-topbar .book-list-add {
        align-self: flex-start;
    }
}

@media (max-width: 560px) {
    .book-list-topbar {
        gap: 16px;
        padding: 17px 15px 15px;
        border-radius: 14px;
    }

    .book-list-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .book-list-heading-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 18px;
    }

    .book-list-copy h1 {
        font-size: 21px;
    }

    .book-list-copy p {
        font-size: 12px;
    }

    .book-list-actions {
        gap: 12px;
        padding-top: 13px;
    }

    .book-list-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .book-list-topbar .btn {
        width: 100%;
        min-width: 0;
        padding: 8px 7px;
        font-size: 11px;
    }

    .book-list-action-divider {
        display: none;
    }

    .book-list-topbar .book-list-add {
        align-self: stretch;
    }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Custom Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--light-card);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-info h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-info p {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-top: 6px;
    font-family: 'Montserrat', sans-serif;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card-icon.primary { background-color: var(--primary-light); color: var(--primary); }
.stat-card-icon.success { background-color: #ECFDF5; color: var(--success); }
.stat-card-icon.info { background-color: #EFF6FF; color: var(--info); }
.stat-card-icon.warning { background-color: #FFFBEB; color: var(--warning); }

/* Dashboard Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-panel {
    background: var(--light-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.panel-body {
    flex: 1;
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(163, 29, 29, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
    border-color: #CBD5E1;
}

.btn-danger {
    background-color: #EF4444;
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Elegant Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: var(--light-bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-color);
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-dark);
    vertical-align: middle;
}

.custom-table tr:hover td {
    background-color: var(--primary-light);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

/* Badge component */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary { background-color: var(--primary-light); color: var(--primary); }
.badge-success { background-color: #D1FAE5; color: #065F46; }
.badge-info { background-color: #DBEAFE; color: #1E40AF; }
.badge-warning { background-color: #FEF3C7; color: #92400E; }

/* Corporate Alert Component */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.alert-success {
    background-color: #ECFDF5;
    border-color: rgba(16, 185, 129, 0.2);
    color: #065F46;
}

.alert-danger {
    background-color: #FEF2F2;
    border-color: rgba(239, 68, 68, 0.15);
    color: #991B1B;
}

.alert-warning {
    background-color: #FFFBEB;
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400E;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Premium Corporate SweetAlert2 Overrides */
.swal2-popup.swal2-modal {
    border-radius: 20px !important;
    padding: 30px 20px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
    border: 1px solid var(--border-color) !important;
}

.swal2-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--dark) !important;
    margin-top: 15px !important;
}

.swal2-html-container {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--text-muted) !important;
    margin-top: 10px !important;
}

.swal2-actions {
    margin-top: 25px !important;
    gap: 10px !important;
}

.swal2-styled.swal2-confirm {
    background-color: var(--primary) !important;
    border-radius: 8px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    transition: background-color 0.2s, box-shadow 0.2s !important;
    border: none !important;
    outline: none !important;
}

.swal2-styled.swal2-confirm:hover {
    background-color: var(--primary-hover) !important;
    box-shadow: 0 4px 12px rgba(163, 29, 29, 0.2) !important;
}

.swal2-styled.swal2-cancel {
    background-color: #ffffff !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    transition: background-color 0.2s, border-color 0.2s !important;
    outline: none !important;
}

.swal2-styled.swal2-cancel:hover {
    background-color: var(--light-bg) !important;
    border-color: #CBD5E1 !important;
}

.swal2-icon {
    margin: 10px auto 5px auto !important;
}

.swal2-icon.swal2-success {
    border-color: var(--success) !important;
    color: var(--success) !important;
}
.swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: var(--success) !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
    border: 4px solid rgba(16, 185, 129, 0.2) !important;
}

.swal2-icon.swal2-error {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}
.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
    background-color: var(--primary) !important;
}

.swal2-icon.swal2-warning {
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.swal2-icon.swal2-info {
    border-color: var(--info) !important;
    color: var(--info) !important;
}

/* Custom Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: white;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-fast);
}

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

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.95) 0%, rgba(20, 30, 55, 0.98) 90.1%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Background animated glow orbs */
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.15;
}

.login-orb-1 {
    width: 400px;
    height: 400px;
    background-color: var(--primary);
    top: -100px;
    left: -100px;
}

.login-orb-2 {
    width: 500px;
    height: 500px;
    background-color: #1E40AF;
    bottom: -150px;
    right: -150px;
}

.login-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 45px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
    text-align: center;
    transition: var(--transition-normal);
}

.login-header img {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.login-header h2 {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    color: #94A3B8;
    font-size: 13px;
    margin-bottom: 30px;
}

.login-card .form-group label {
    color: #CBD5E1;
    text-align: left;
}

.login-card .form-control {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(163, 29, 29, 0.3);
    background-color: rgba(15, 23, 42, 0.8);
}

.login-error {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

/* Detail & QR Tag Printing Styles */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--light-bg);
    margin-bottom: 20px;
}

.qr-code-wrapper {
    position: relative;
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    padding: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 15px;
}

.qr-code-image {
    display: block;
    width: 500px;
    height: auto;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.qr-label-header {
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: var(--dark);
    text-align: center;
}

.qr-label-header strong,
.qr-label-header span {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    line-height: 1.35;
}

.qr-label-header strong {
    color: var(--primary);
    font-size: 13px;
}

.qr-label-header span {
    margin-top: 2px;
    font-size: 11px;
}

.qr-label-details {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    color: var(--dark);
    overflow-wrap: anywhere;
}

.qr-label-title {
    margin: 0 0 8px;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.qr-label-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 12px;
    font-size: 10px;
    line-height: 1.35;
}

.qr-label-meta div {
    min-width: 0;
}

.qr-label-meta strong {
    color: var(--text-muted);
    font-weight: 600;
}

.qr-info-label {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

@media print {
    @page qr-label {
        size: 70mm 50mm;
        margin: 0;
    }

    body.qr-label-print-page {
        page: qr-label;
    }

    body.qr-label-print-page,
    body.qr-label-print-page .app-container,
    body.qr-label-print-page .main-content {
        width: 70mm !important;
        height: 50mm !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #FFFFFF !important;
    }

    body.qr-label-print-page * {
        visibility: hidden !important;
    }

    body.qr-label-print-page #qrPrintArea,
    body.qr-label-print-page #qrPrintArea * {
        visibility: visible !important;
    }

    body.qr-label-print-page #qrPrintArea {
        position: fixed !important;
        inset: 0 !important;
        display: flex !important;
        box-sizing: border-box !important;
        width: 70mm !important;
        height: 50mm !important;
        max-height: 50mm !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        overflow: hidden !important;
        padding: 2mm !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #FFFFFF !important;
        box-shadow: none !important;
        color: #0F172A !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-header {
        flex: 0 0 auto;
        padding-bottom: 2mm;
        border-bottom-width: 0.5mm;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-header strong {
        font-size: 9pt;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-header span {
        margin-top: 0.5mm;
        font-size: 7pt;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-content {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        gap: 2mm;
        width: 100%;
        min-height: 0;
        padding-top: 1mm;
    }

    body.qr-label-print-page #qrPrintArea .qr-code-wrapper {
        flex: 0 0 32mm;
        width: 32mm !important;
        max-width: 32mm !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    body.qr-label-print-page #qrPrintArea .qr-code-image {
        width: 32mm !important;
        height: 32mm !important;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-details {
        flex: 1 1 0;
        min-height: 0;
        padding: 0 0 0 2mm;
        border-top: 0;
        border-left: 0.25mm solid #CBD5E1;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-title {
        margin: 0 0 1mm;
        font-size: 7pt;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-meta {
        display: block;
        font-size: 6pt;
        line-height: 1.15;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-meta div {
        margin-bottom: 0.6mm;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-meta strong {
        color: #334155 !important;
    }

    body.qr-label-print-page #qrPrintArea .qr-label-footer {
        margin-top: 1mm;
        color: #475569 !important;
        font-size: 5pt;
        text-align: left;
    }

    body.qr-label-print-page .qr-print-controls,
    body.qr-label-print-page .qr-print-panel-header {
        display: none !important;
    }
}

/* Public Corporate Header Styles */
.public-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: var(--transition-normal);
}

.public-header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.public-header-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.public-header-text h1.public-header-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--primary);
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
}

.public-header-text p.public-header-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
}

.public-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.public-header-actions .btn {
    font-size: 13px;
    padding: 8px 16px;
}

.public-header-actions .btn-secondary {
    border-color: var(--primary);
    color: var(--primary);
}

/* Public Main Content Area Spacing */
.public-container .main-content {
    margin-left: 0;
    padding: 30px;
    transition: var(--transition-normal);
}

.library-hero-slider {
    position: relative;
    width: min(1600px, 100vw);
    max-width: 1600px;
    height: min(37.5vw, 600px);
    margin: -30px 0 22px calc((100% - min(1600px, 100vw)) / 2);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: #E2E8F0;
    box-shadow: var(--shadow-md);
}

.library-hero-slides,
.library-hero-slide {
    position: absolute;
    inset: 0;
}

.library-hero-slide {
    isolation: isolate;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.library-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.library-hero-slide img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.library-hero-slide::before {
    position: absolute;
    z-index: 0;
    inset: -12px;
    content: "";
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(12px) brightness(0.65);
    transform: scale(1.04);
}

.library-hero-slide-building img {
    object-position: center 24%;
}

.library-hero-slide-building::before {
    background-image: url('../images/slider/01-sorgun-myo-bina.png');
}

.library-hero-slide-facilities::before {
    background-image: url('../images/slider/02-sorgun-myo-tanitim.png');
}

.library-hero-slide-signage::before {
    background-image: url('../images/slider/03-sorgun-myo-giris.png');
}

.library-hero-slide-library img {
    object-position: center 48%;
}

.library-hero-slide-library::before {
    background-image: url('../images/slider/04-sorgun-myo-kutuphane.png');
}

.library-hero-slide-signage img {
    object-position: center 42%;
}

.library-hero-slide::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.28) 58%, rgba(15, 23, 42, 0.04) 100%);
}

.library-hero-caption {
    position: absolute;
    z-index: 3;
    left: clamp(24px, 6vw, 78px);
    bottom: clamp(48px, 6vw, 76px);
    max-width: min(680px, 78%);
    color: #FFFFFF;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.library-hero-caption span {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-hero-caption h2 {
    margin: 0;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(24px, 3.4vw, 42px);
    font-weight: 800;
    line-height: 1.16;
}

.library-hero-control,
.library-hero-toggle,
.library-hero-indicators button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #FFFFFF;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.library-hero-control:hover,
.library-hero-toggle:hover,
.library-hero-indicators button:hover {
    background: var(--primary);
}

.library-hero-control:focus-visible,
.library-hero-toggle:focus-visible,
.library-hero-indicators button:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 3px;
}

.library-hero-control {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transform: translateY(-50%);
}

.library-hero-control:hover {
    transform: translateY(-50%) scale(1.06);
}

.library-hero-prev {
    left: 18px;
}

.library-hero-next {
    right: 18px;
}

.library-hero-controls {
    position: absolute;
    z-index: 2;
    right: 20px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-hero-indicators {
    display: flex;
    align-items: center;
    gap: 7px;
}

.library-hero-indicators button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
}

.library-hero-indicators button.is-active {
    width: 24px;
    border-radius: 10px;
    background: var(--primary);
}

.library-hero-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 12px;
}

@media (max-width: 768px) {
    .library-hero-slider {
        height: min(37.5vw, 600px);
        margin-top: -20px;
        margin-bottom: 18px;
    }

    .library-hero-slide-building img {
        object-position: center 22%;
    }

    .library-hero-slide-library img {
        object-position: center 48%;
    }

    .library-hero-caption {
        bottom: 58px;
        max-width: 78%;
    }

    .library-hero-caption span {
        font-size: 10px;
    }

    .library-hero-caption h2 {
        font-size: clamp(21px, 6vw, 30px);
    }

    .library-hero-control {
        width: 36px;
        height: 36px;
    }

    .library-hero-prev {
        left: 10px;
    }

    .library-hero-next {
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .library-hero-slide {
        transition: none;
    }
}

.site-footer {
    background: #FFFFFF;
    color: #475569;
    padding: 34px 30px 16px;
    border-top: 3px solid var(--primary);
}

.site-footer-main,
.site-footer-bottom {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.site-footer-main {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.8fr) minmax(160px, 0.7fr);
    gap: 36px;
    align-items: start;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-footer-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    flex-shrink: 0;
    background: #FFFFFF;
    border-radius: 50%;
    padding: 3px;
    border: 1px solid #E2E8F0;
}

.site-footer-brand h2,
.site-footer-project h3,
.site-footer-social h3 {
    color: var(--primary);
    font-size: 14px;
    margin: 0 0 10px;
}

.site-footer-brand h2 {
    margin-bottom: 4px;
}

.site-footer-brand p,
.site-footer-project p {
    color: #475569;
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
}

.site-footer-project p + p {
    margin-top: 4px;
}

.site-footer-project strong {
    color: #1E293B;
}

.site-footer-social h3 {
    margin-bottom: 12px;
}

.site-footer-social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-footer-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #E2E8F0;
    border-radius: 50%;
    background: #F8FAFC;
    color: #475569;
    font-size: 16px;
    text-decoration: none;
    transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.site-footer-social-icons .social-facebook {
    color: #4267B2;
}

.site-footer-social-icons .social-twitter {
    color: #475569;
}

.site-footer-social-icons .social-web {
    color: #64748B;
}

.site-footer-social-icons .social-instagram {
    color: #C13584;
}

.site-footer-social-icons a:hover,
.site-footer-social-icons a:focus-visible {
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.site-footer-social-icons .social-facebook:hover,
.site-footer-social-icons .social-facebook:focus-visible {
    background: #4267B2;
    border-color: #4267B2;
}

.site-footer-social-icons .social-twitter:hover,
.site-footer-social-icons .social-twitter:focus-visible {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.site-footer-social-icons .social-web:hover,
.site-footer-social-icons .social-web:focus-visible {
    background: #64748B;
    border-color: #64748B;
}

.site-footer-social-icons .social-instagram:hover,
.site-footer-social-icons .social-instagram:focus-visible {
    background: #C13584;
    border-color: #C13584;
}

.site-footer-social-icons a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.site-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid #E2E8F0;
    color: #64748B;
    font-size: 11px;
}

.site-footer-bottom p {
    margin: 0;
}

/* Custom Grids for Responsive Layouts */
.grid-details {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 280px;
    align-items: center;
}

.settings-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        top: 0;
        left: 0;
        width: min(300px, calc(100vw - 56px));
        height: 100vh;
        height: 100dvh;
        padding-top: env(safe-area-inset-top);
        transform: translateX(-105%);
        transition: transform var(--transition-normal);
        z-index: 110;
    }

    .login-mobile-sidebar {
        display: flex;
    }

    .public-mobile-sidebar {
        display: flex;
    }

    .public-mobile-header {
        display: flex;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }

    .admin-mobile-header {
        position: fixed;
        inset: 0 0 auto;
        z-index: 100;
        display: flex;
        align-items: center;
        gap: 13px;
        min-height: calc(64px + env(safe-area-inset-top));
        padding: calc(8px + env(safe-area-inset-top)) 18px 8px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .fullscreen-mode .login-mobile-header {
        display: flex;
    }

    .fullscreen-mode .login-split-container {
        padding-top: calc(64px + env(safe-area-inset-top));
    }

    .admin-mobile-menu-toggle {
        display: grid;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        place-items: center;
        border: 1px solid #E8D6D6;
        border-radius: 12px;
        background: #FFF7F7;
        color: var(--primary);
        font-size: 18px;
        cursor: pointer;
        transition: background-color var(--transition-fast), transform var(--transition-fast);
    }

    .admin-mobile-menu-toggle:hover {
        background: #FDECEC;
    }

    .admin-mobile-menu-toggle:focus-visible,
    .admin-mobile-brand:focus-visible {
        outline: 3px solid rgba(163, 29, 29, 0.3);
        outline-offset: 3px;
    }

    .admin-mobile-brand {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 10px;
        color: var(--dark);
        text-decoration: none;
    }

    .admin-mobile-brand img {
        width: 38px;
        height: 38px;
        object-fit: contain;
    }

    .admin-mobile-brand span {
        display: flex;
        min-width: 0;
        flex-direction: column;
        line-height: 1.3;
    }

    .admin-mobile-brand strong {
        font-size: 13px;
        letter-spacing: 0.03em;
    }

    .admin-mobile-brand small {
        overflow: hidden;
        color: var(--text-muted);
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 105;
        display: block;
        border: 0;
        background: rgba(15, 23, 42, 0.52);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-normal), visibility var(--transition-normal);
        visibility: hidden;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    body.sidebar-open {
        overflow: hidden;
    }
    
    .main-content {
        margin-left: 0;
        padding: 84px 20px 20px;
    }
    
    .public-container .main-content {
        padding: calc(80px + env(safe-area-inset-top)) 15px 20px;
    }

    .site-footer {
        padding: 28px 18px 14px;
    }

    .site-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .site-footer-project {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .site-footer-social {
        grid-column: 2;
        grid-row: 1;
    }

    .mobile-toggle {
        display: none !important;
    }
    
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        position: static;
        padding: 10px 0;
    }
    
    .topbar-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .topbar-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Responsive Header */
    .public-header {
        display: none;
    }

    .public-mobile-header {
        min-height: calc(62px + env(safe-area-inset-top));
        padding-right: 14px;
        padding-left: 14px;
    }

    .public-mobile-sidebar .sidebar-menu {
        padding-top: 20px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

@media (max-width: 600px) {
    .site-footer-main {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .site-footer-project {
        grid-column: auto;
        grid-row: auto;
    }

    .site-footer-social {
        grid-column: auto;
        grid-row: auto;
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .settings-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .settings-stats-row form {
        width: 100%;
    }
    .settings-stats-row button {
        width: 100%;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }
    
    .form-footer-hint {
        justify-content: center;
    }
    
    .form-footer-actions {
        flex-direction: column;
    }
    
    .form-footer-actions .btn {
        width: 100%;
    }
    
    .cover-search-row {
        flex-direction: column;
    }
    
    #search_cover_btn {
        width: 100%;
    }
}


/* Pulsing Notification Badge */
.pulse-badge {
    background-color: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: badge-pulse 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes badge-pulse {
    to {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* ============================================================
   Kitap Ekle Sayfası - Add Book Page Layout
   ============================================================ */

.add-book-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .add-book-layout {
        grid-template-columns: 1fr;
    }
    .preview-panel {
        position: static;
    }
}

/* Left: Live Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 30px;
}

.cover-preview-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.cover-frame {
    width: 140px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    background: linear-gradient(135deg, var(--primary) 0%, #0F172A 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    margin-bottom: 18px;
    position: relative;
    transition: box-shadow 0.3s;
}

.cover-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.cover-frame img.loaded {
    opacity: 1;
}

.live-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 4px;
    line-height: 1.3;
    min-height: 20px;
}

.live-author {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 16px;
    margin-bottom: 12px;
}

.live-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.preview-tip {
    background: linear-gradient(135deg, var(--primary) 0%, #701010 100%);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-size: 12px;
    line-height: 1.6;
}

.preview-tip strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 700;
}

/* Right: Main Form Panel */
.form-main-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.form-section-header {
    padding: 18px 28px;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.form-section-header h3 {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.form-section-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.form-section-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Enhanced field inputs */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-icon-wrap {
    position: relative;
}

.field-icon-wrap i.fi {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}

.field-icon-wrap .form-control {
    padding-left: 42px !important;
    height: 46px;
    border-radius: 10px;
    border: 1.5px solid #CBD5E1;
    background: #F8FAFC;
    font-size: 14px;
    transition: all 0.2s;
}

.field-icon-wrap .form-control:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(163, 29, 29, 0.1);
}

.field-icon-wrap .form-control:focus + i.fi,
.field-icon-wrap:focus-within i.fi {
    color: var(--primary);
}

.field-grid-2,
.field-grid-3 {
    display: grid;
    gap: 18px;
}
.field-grid-2 {
    grid-template-columns: 1fr 1fr;
}
.field-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .field-grid-2,
    .field-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Cover search row */
.cover-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.cover-search-row .field-icon-wrap {
    flex: 1;
}

#search_cover_btn {
    height: 46px;
    border-radius: 10px;
    padding: 0 18px;
    white-space: nowrap;
    font-size: 13px;
}

.cover-results-grid {
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: var(--light-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    justify-content: center;
}

.cover-selected-preview {
    display: none;
    margin-top: 16px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 10px;
}

.cover-selected-preview img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

/* File upload drag & drop zone */
.upload-zone {
    border: 2px dashed #CBD5E1;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    background: #F8FAFC;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Form action footer bar */
.form-footer {
    background: white;
    border-radius: 16px;
    padding: 20px 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-footer-hint {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-footer-actions {
    display: flex;
    gap: 10px;
}

.btn-save {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, #701010 100%);
    box-shadow: 0 4px 12px rgba(163, 29, 29, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(163, 29, 29, 0.35);
}

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