/* ============================================
   Kütüphane Projesi — Custom CSS
   Adana Büyükşehir Belediyesi
   ============================================ */

:root {
    --brand-primary: #292561;
    --brand-primary-light: #3a3580;
    --brand-primary-dark: #1a1745;
    --brand-accent: #6c63ff;
    --brand-accent-light: #8b85ff;
    --brand-gradient: linear-gradient(135deg, #292561 0%, #6c63ff 100%);
    --brand-gradient-soft: linear-gradient(135deg, rgba(41,37,97,0.05) 0%, rgba(108,99,255,0.05) 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --shadow-card: 0 4px 24px rgba(41, 37, 97, 0.08);
    --shadow-card-hover: 0 12px 40px rgba(41, 37, 97, 0.15);
    --shadow-elevated: 0 20px 60px rgba(41, 37, 97, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Global Enhancements
   ============================================ */

body {
    scroll-behavior: smooth;
}

::selection {
    background: var(--brand-accent);
    color: #fff;
}

/* ============================================
   Card Hover Effects
   ============================================ */

.card-hover-lift {
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
}

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

/* Şube kartları hover efekti */
.tiny-slider .card {
    transition: var(--transition-smooth);
}

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

.tiny-slider .card .card-img-top {
    transition: transform 0.5s ease;
}

.tiny-slider .card:hover .card-img-top {
    transform: scale(1.05);
}

.tiny-slider .card .card-body {
    overflow: hidden;
}

/* ============================================
   Glassmorphism Sayaç Bölümü
   ============================================ */

.glass-counter {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px !important;
    padding: 2rem;
}

.counter-item {
    position: relative;
    padding: 1.5rem 0;
}

.counter-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.counter-item:last-child::after {
    display: none;
}

@media (max-width: 768px) {
    .counter-item::after {
        display: none;
    }
}

/* ============================================
   Slider Enhancements
   ============================================ */

.slider-content-overlay {
    animation: fadeInUp 0.8s ease-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ============================================
   Kitap Detay Modal
   ============================================ */

#kitapDetayModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-elevated);
    overflow: hidden;
}

#kitapDetayModal .modal-header {
    background: var(--brand-gradient);
    border: none;
    padding: 1.5rem 2rem;
}

#kitapDetayModal .modal-header .modal-title {
    color: #fff;
    font-weight: 600;
}

#kitapDetayModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#kitapDetayModal .modal-body {
    padding: 2rem;
}

.kitap-info-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--brand-gradient-soft);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.kitap-info-item:hover {
    background: rgba(41, 37, 97, 0.08);
    transform: translateX(5px);
}

.kitap-info-item i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
    color: #fff;
    border-radius: 8px;
    margin-right: 1rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.kitap-info-item .info-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.kitap-info-item .info-value {
    font-weight: 500;
    color: #2d3748;
}

[data-bs-theme="dark"] .kitap-info-item .info-value {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .kitap-info-item {
    background: rgba(108, 99, 255, 0.1);
}

[data-bs-theme="dark"] .kitap-info-item:hover {
    background: rgba(108, 99, 255, 0.15);
}

/* ============================================
   Section Titles
   ============================================ */

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--brand-gradient);
    border-radius: 3px;
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb-modern {
    background: var(--brand-gradient-soft);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
}

.breadcrumb-modern .breadcrumb-item a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.breadcrumb-modern .breadcrumb-item a:hover {
    color: var(--brand-accent);
}

.breadcrumb-modern .breadcrumb-item.active {
    color: #6c757d;
}

/* ============================================
   Admin Panel — Sidebar
   ============================================ */

.panel-wrapper {
    display: flex;
    min-height: 100vh;
}

.panel-sidebar {
    width: 260px;
    background: var(--brand-gradient);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    transition: var(--transition-smooth);
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(41, 37, 97, 0.15);
}

.panel-sidebar::-webkit-scrollbar {
    width: 4px;
}

.panel-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.panel-sidebar .sidebar-brand {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-sidebar .sidebar-brand img {
    height: 50px;
    filter: brightness(0) invert(1);
}

.panel-sidebar .sidebar-brand h6 {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.panel-sidebar .sidebar-nav {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.panel-sidebar .sidebar-nav .nav-label {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.panel-sidebar .sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.panel-sidebar .sidebar-nav .nav-item a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--brand-accent-light);
}

.panel-sidebar .sidebar-nav .nav-item a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #fff;
}

.panel-sidebar .sidebar-nav .nav-item a i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 1rem;
}

.panel-sidebar .sidebar-nav .nav-item a .badge {
    margin-left: auto;
    font-size: 0.7rem;
}

/* ============================================
   Admin Panel — Content
   ============================================ */

.panel-content {
    margin-left: 260px;
    padding: 0;
    width: calc(100% - 260px);
    min-height: 100vh;
    background: #f8f9fe;
    transition: var(--transition-smooth);
}

[data-bs-theme="dark"] .panel-content {
    background: #1a1d2e;
}

.panel-topbar {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

[data-bs-theme="dark"] .panel-topbar {
    background: #242736;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.panel-topbar .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.panel-body {
    padding: 2rem;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sidebar-toggle:hover {
    background: var(--brand-primary-light);
}

/* ============================================
   Admin Panel — Stat Cards
   ============================================ */

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    border: none;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-gradient);
    border-radius: 16px 16px 0 0;
}

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

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

.stat-card .stat-icon.bg-purple {
    background: rgba(108, 99, 255, 0.12);
    color: var(--brand-accent);
}

.stat-card .stat-icon.bg-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.stat-card .stat-icon.bg-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.stat-card .stat-icon.bg-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

[data-bs-theme="dark"] .stat-card {
    background: #242736;
}

[data-bs-theme="dark"] .stat-card .stat-number {
    color: #e2e8f0;
}

/* ============================================
   Admin Panel — Data Table Cards
   ============================================ */

.panel-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: none;
    overflow: hidden;
}

.panel-card .panel-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-card .panel-card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1a202c;
}

.panel-card .panel-card-body {
    padding: 1.5rem;
}

[data-bs-theme="dark"] .panel-card {
    background: #242736;
}

[data-bs-theme="dark"] .panel-card .panel-card-header {
    border-bottom-color: #2d3148;
}

[data-bs-theme="dark"] .panel-card .panel-card-header h5 {
    color: #e2e8f0;
}

/* ============================================
   Admin Panel — Action Buttons
   ============================================ */

.btn-brand {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
    color: #fff;
}

.btn-brand-soft {
    background: rgba(108, 99, 255, 0.1);
    color: var(--brand-accent);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-brand-soft:hover {
    background: rgba(108, 99, 255, 0.2);
    color: var(--brand-accent);
}

/* Action buttons in tables */
.btn-action {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    transition: var(--transition-smooth);
    font-size: 0.85rem;
}

.btn-action.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.btn-action.btn-edit:hover {
    background: #3b82f6;
    color: #fff;
}

.btn-action.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-action.btn-delete:hover {
    background: #ef4444;
    color: #fff;
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-custom {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: none;
    overflow: hidden;
    min-width: 320px;
}

.toast-custom.toast-success {
    border-left: 4px solid #10b981;
}

.toast-custom.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-custom.toast-warning {
    border-left: 4px solid #f59e0b;
}

/* ============================================
   Login Page
   ============================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(108, 99, 255, 0.15);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: pulse 4s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: pulse 5s ease-in-out infinite 1s;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

[data-bs-theme="dark"] .login-card {
    background: rgba(36, 39, 54, 0.95);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .login-logo img {
    height: 70px;
    margin-bottom: 1rem;
}

.login-card .login-logo h4 {
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-card .login-logo p {
    color: #6b7280;
    font-size: 0.9rem;
}

.login-card .form-control {
    border-radius: 12px;
    padding: 0.8rem 1rem;
    border: 2px solid #e5e7eb;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.login-card .form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

.login-card .input-group-text {
    border-radius: 12px 0 0 12px;
    border: 2px solid #e5e7eb;
    border-right: none;
    background: #f9fafb;
    color: var(--brand-primary);
}

.login-card .input-group .form-control {
    border-radius: 0 12px 12px 0;
    border-left: none;
}

.login-card .input-group:focus-within .input-group-text {
    border-color: var(--brand-accent);
}

.login-card .btn-login {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    padding: 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

/* ============================================
   Admin Modal Enhancements
   ============================================ */

.modal-panel .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-elevated);
}

.modal-panel .modal-header {
    background: var(--brand-gradient);
    border: none;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}

.modal-panel .modal-header .modal-title {
    color: #fff;
    font-weight: 600;
}

.modal-panel .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-panel .modal-body {
    padding: 1.5rem;
}

.modal-panel .modal-footer {
    border-top: 1px solid #f0f0f5;
    padding: 1rem 1.5rem;
}

.modal-panel .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.4rem;
}

.modal-panel .form-control,
.modal-panel .form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 0.65rem 1rem;
    transition: var(--transition-smooth);
}

.modal-panel .form-control:focus,
.modal-panel .form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

/* ============================================
   Responsive — Mobile Sidebar
   ============================================ */

@media (max-width: 991.98px) {
    .panel-sidebar {
        transform: translateX(-100%);
    }

    .panel-sidebar.show {
        transform: translateX(0);
    }

    .panel-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .panel-body {
        padding: 1rem;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* ============================================
   AOS Custom Animations
   ============================================ */

[data-aos="fade-up-custom"] {
    opacity: 0;
    transform: translateY(40px);
    transition-property: opacity, transform;
}

[data-aos="fade-up-custom"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Kitap Detay Sayfası
   ============================================ */

.kitap-detay-header {
    background: var(--brand-gradient);
    padding: 3rem 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.kitap-detay-header::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -50px;
}

.kitap-detay-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-elevated);
    padding: 2rem;
    margin-top: -50px;
    position: relative;
    z-index: 1;
}

[data-bs-theme="dark"] .kitap-detay-card {
    background: #242736;
}

/* ============================================
   DataTables Custom Style
   ============================================ */

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.4rem 0.75rem;
    transition: var(--transition-smooth);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--brand-gradient) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(108, 99, 255, 0.1) !important;
    color: var(--brand-accent) !important;
    border: none !important;
    border-radius: 8px;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: #6b7280;
    font-weight: 600;
}

.empty-state p {
    color: #9ca3af;
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-brand {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(108, 99, 255, 0.2);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Form Switch Custom
   ============================================ */

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

/* ============================================
   Alert Login Error
   ============================================ */

.alert-login {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}
