@charset "UTF-8";

:root {
    --brand-primary: #2563eb;
    --brand-accent: #3b82f6;
    --brand-dark: #1f2937;
    --brand-muted: #4b5563;
    --brand-light: #f3f4f6;
    --brand-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --transition-fast: 200ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

::selection {
    background: rgba(39, 75, 254, 0.18);
    color: var(--brand-dark);
}

body {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, var(--brand-light) 0%, #ffffff 55%);
    color: var(--brand-dark);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: inherit;
}

.navbar {
    padding: 0.9rem 0;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px rgba(25, 38, 79, 0.08);
    border-bottom: 1px solid rgba(39, 75, 254, 0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow var(--transition-fast), backdrop-filter var(--transition-fast);
}

.navbar.scrolled {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--brand-primary);
    z-index: 1035;
    transition: width 180ms ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--brand-primary);
    font-size: 1.7rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    color: #000000;
    transform: translateY(-1px);
}


.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1.05rem;
    background: transparent;
}

.brand-icon .brand-logo {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-text {
    line-height: 1;
}

.nav-link {
    font-weight: 500;
    color: rgba(27, 37, 89, 0.78) !important;
    margin: 0 0.35rem;
    position: relative;
    padding: 0.5rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: color var(--transition-fast);
}

.nav-link i {
    font-size: 1.05rem;
    line-height: 1;
}

.nav-link span {
    display: inline-flex;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.3rem;
    height: 2px;
    background: var(--brand-primary);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--brand-primary) !important;
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.dropdown-menu {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
    padding: 0.7rem;
}

.dropdown-item {
    border-radius: 0.65rem;
    font-weight: 500;
    color: var(--brand-dark);
    padding: 0.55rem 0.95rem;
    transition: background var(--transition-fast), color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.dropdown-item i {
    font-size: 1.05rem;
    color: var(--brand-primary);
}

.dropdown-item:hover {
    background: rgba(39, 75, 254, 0.12);
    color: var(--brand-primary);
}

.header {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--brand-gradient);
    border: none;
    border-radius: var(--radius-lg);
    margin: 2rem auto 3rem;
    max-width: 1100px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(39, 75, 254, 0.22);
}

.header::before,
.header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(0.5px);
}

.header::before {
    width: 260px;
    height: 260px;
    top: -120px;
    right: -60px;
}

.header::after {
    width: 180px;
    height: 180px;
    bottom: -90px;
    left: -40px;
}

.header h3,
.header h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header h3 {
    font-size: clamp(2rem, 2.5vw + 1rem, 2.6rem);
}

.header h4 {
    font-size: clamp(1.8rem, 2vw + 1rem, 2.2rem);
}

.header p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 1rem auto 0;
}

.container {
    position: relative;
    z-index: 1;
}


.search-input-group {
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(25, 38, 79, 0.12);
}

.search-input-group .form-control {
    border: none;
    background: #ffffff;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
}

.search-input-group .form-control:focus {
    box-shadow: none;
}

.input-icon-group {
    border-radius: 1rem;
    border: 1px solid rgba(39, 75, 254, 0.12);
    box-shadow: 0 16px 32px rgba(25, 38, 79, 0.12);
    overflow: hidden;
    background: #ffffff;
}

.input-icon-group .input-group-text {
    border: none;
    background: rgba(39, 75, 254, 0.12);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
}

.input-icon-group .form-control,
.input-icon-group .form-select {
    border: none;
    border-left: 1px solid rgba(39, 75, 254, 0.08);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 0;
    background: #ffffff;
}

.input-icon-group .form-control:focus,
.input-icon-group .form-select:focus {
    box-shadow: none;
    background: #ffffff;
}

.input-icon-group .btn-outline-secondary {
    border: none;
    border-left: 1px solid rgba(39, 75, 254, 0.08);
    border-radius: 0;
    padding: 0 1rem;
    color: var(--brand-muted);
    background: transparent;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.input-icon-group .btn-outline-secondary:hover {
    background: rgba(39, 75, 254, 0.12);
    color: var(--brand-primary);
}

.input-icon-group .btn-outline-secondary i {
    pointer-events: none;
}

.search-input-group .btn {
    min-width: 150px;
}

.form-control,
.form-select {
    border: 1px solid rgba(39, 75, 254, 0.12);
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(39, 75, 254, 0.15);
}

.book-card {
    margin-bottom: 2rem;
}

.book-card .card {
    border: none;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
    transition: transform 220ms ease, box-shadow 220ms ease;
    background: #ffffff;
    height: 100%;
}

.book-card .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
}

.book-card .card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.book-card .card:hover .card-img-top {
    transform: scale(1.05);
}

.book-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.book-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--brand-dark);
}

.book-card .btn {
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.similar-books .card {
    border: none;
    border-radius: 1.1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.similar-books .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.similar-books .card img {
    margin-top: 1.2rem;
}

.my-6 {
    margin-top: 4.5rem !important;
    margin-bottom: 4.5rem !important;
}

.btn {
    padding: 0.55rem 1.15rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.btn i {
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-light {
    background: #ffffff;
    color: var(--brand-dark);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-light:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-dark);
    border-color: rgba(37, 99, 235, 0.4);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: var(--brand-muted);
}

.btn-outline-secondary:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.45);
    color: var(--brand-primary);
}



/* Modal form styling aligned with admin templates */
.modal-content {
    border-radius: 1.15rem;
    border: none;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem;
    background: var(--brand-gradient);
    color: #ffffff;
    border-top-left-radius: 1.15rem;
    border-top-right-radius: 1.15rem;
}

.modal-body {
    background: #ffffff;
    color: var(--brand-dark);
    text-align: left;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-title i {
    font-size: 1.1rem;
}

.modal .card {
    border-radius: 1rem;
}

.modal .card-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.modal .form-label {
    display: block;
    font-weight: 500;
    color: var(--brand-dark);
    text-align: left;
}

.form-progress .progress {
    background: rgba(37, 99, 235, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.form-progress .progress-bar {
    background: var(--brand-gradient);
}

.modal .input-group {
    border-radius: 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.modal .input-group + .invalid-feedback,
.modal .input-group .invalid-feedback {
    margin-top: 0.5rem;
    text-align: left;
}

.modal .input-group-text {
    border: none;
    background: rgba(37, 99, 235, 0.14);
    color: var(--brand-primary);
    min-width: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0.9rem;
    border-bottom-left-radius: 0.9rem;
}

.modal .input-group .form-control,
.modal .input-group .form-select {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.modal .input-group .form-control:last-of-type,
.modal .input-group .form-select:last-of-type,
.modal .input-group .btn-outline-secondary:last-of-type {
    border-top-right-radius: 0.9rem;
    border-bottom-right-radius: 0.9rem;
}

.modal .input-group .btn-outline-secondary {
    border: none;
    border-left: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 0;
    color: var(--brand-muted);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.modal .input-group .btn-outline-secondary:hover {
    background: rgba(37, 99, 235, 0.16);
    color: var(--brand-primary);
}

.modal-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom-left-radius: 1.15rem;
    border-bottom-right-radius: 1.15rem;
    gap: 0.75rem;
}

.modal-footer .btn-light {
    background: transparent;
    border: none;
    color: var(--brand-muted);
    font-weight: 500;
}

.modal-footer .btn-light:hover {
    color: var(--brand-primary);
}

.modal-footer .btn-primary {
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

@media (max-width: 768px) {
    .modal-body {
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

.text-primary {
    color: var(--brand-primary) !important;
}

.text-muted {
    font-size: 0.9rem;
    color: var(--brand-muted) !important;
}

.form-label {
    font-size: 0.9rem;
    color: var(--brand-dark);
    font-weight: 500;
}

.badge {
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.card {
    border: none;
    border-radius: 1.25rem;
}

.card-body {
    color: var(--brand-dark);
}

.card p {
    color: var(--brand-muted);
}

.shadow-sm {
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08) !important;
}

.border {
    border: 1px solid rgba(39, 75, 254, 0.12) !important;
}

.rounded {
    border-radius: 1rem !important;
}

.table {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
}

.table thead {
    background: rgba(39, 75, 254, 0.08);
}

.table thead th {
    border: none;
    color: var(--brand-dark);
    font-weight: 600;
}

.table tbody tr {
    border-bottom: 1px solid rgba(39, 75, 254, 0.08);
}

.table tbody tr:last-child {
    border-bottom: none;
}

@media (max-width: 992px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-link {
        margin: 0.2rem 0;
    }

    .header {
        margin: 1.5rem 1rem 2.5rem;
        padding: 3.2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 2.8rem 1.4rem;
        margin: 1.2rem 0.8rem 2rem;
    }

    .book-card .card-img-top {
        height: 200px;
    }

    .input-group .btn {
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .navbar {
        border-radius: 0;
    }

    .header {
        border-radius: 1rem;
    }

    .book-card .card {
        border-radius: 1rem;
    }

    .book-card .card-img-top {
        height: 190px;
    }
}