/* ============================================
   Library Management System - Custom CSS
   ============================================ */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1d23;
    --primary: #4e73df;
    --success: #1cc88a;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --info: #36b9cc;
}

/* ============================================
   Layout
   ============================================ */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8f9fc;
    color: #333;
}

#wrapper {
    min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg) !important;
    transition: width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

#wrapper.sidebar-collapsed .sidebar {
    width: 60px;
}

#wrapper.sidebar-collapsed .sidebar .nav-link span,
#wrapper.sidebar-collapsed .sidebar .sidebar-header div,
#wrapper.sidebar-collapsed .sidebar .text-muted.small {
    display: none;
}

#wrapper.sidebar-collapsed .sidebar .sidebar-header {
    justify-content: center;
}

.sidebar .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255,255,255,0.8) !important;
    transition: all 0.2s;
    border-radius: 6px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active-nav {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

.sidebar .nav-link.active-nav {
    background: var(--primary);
    color: #fff !important;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    min-width: 0;
    overflow-x: hidden;
}

/* ============================================
   Stat Cards
   ============================================ */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

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

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

.stat-bg-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-bg-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-bg-warning { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.stat-bg-danger  { background: linear-gradient(135deg, #f953c6 0%, #b91d73 100%); }
.stat-bg-info    { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-bg-teal    { background: linear-gradient(135deg, #0fd850 0%, #f9f047 100%); }

/* ============================================
   Tables
   ============================================ */
.table-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.07);
}

.table thead th {
    background: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a5c69;
    padding: 0.85rem 1rem;
}

.table tbody tr:hover {
    background-color: #f8f9ff;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* ============================================
   Forms
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 0.35rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
}

.btn-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* ============================================
   Book Cover
   ============================================ */
.book-cover {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
}

.book-cover-lg {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.2);
}

/* ============================================
   Search Box
   ============================================ */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
    border-radius: 50px;
}

.search-box .search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

/* Live search results */
#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
}

#searchResults .search-item {
    padding: 0.65rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

#searchResults .search-item:hover {
    background: #f8f9ff;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

/* ============================================
   Charts
   ============================================ */
.chart-container {
    position: relative;
    height: 280px;
}

/* ============================================
   Member Photo
   ============================================ */
.member-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e3e6f0;
}

/* ============================================
   Status Timeline
   ============================================ */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        z-index: 1050;
        transform: translateX(-100%);
    }

    #wrapper.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        width: 100%;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar, .navbar, .btn, .no-print {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }

    .table {
        font-size: 11px;
    }
}

/* ============================================
   Public Website
   ============================================ */
body.public-site {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(244, 201, 93, 0.18), transparent 28%),
        linear-gradient(180deg, #f7f0e6 0%, #fcfaf6 45%, #f5efe7 100%);
    color: #173a3a;
    position: relative;
    overflow-x: hidden;
}

.public-site h1,
.public-site h2,
.public-site h3,
.public-site .public-display,
.public-site .public-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.03em;
}

.public-bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.public-bg-orb-one {
    width: 360px;
    height: 360px;
    background: rgba(244, 201, 93, 0.28);
    top: -120px;
    left: -120px;
}

.public-bg-orb-two {
    width: 320px;
    height: 320px;
    background: rgba(62, 107, 97, 0.16);
    bottom: 6%;
    right: -100px;
}

.public-header,
.public-site main,
.public-footer {
    position: relative;
    z-index: 1;
}

.public-navbar {
    padding: 1rem 0;
    background: rgba(252, 249, 242, 0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(23, 58, 58, 0.08);
}

.public-brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: #173a3a;
}

.public-brand strong,
.footer-brand strong {
    display: block;
    font-size: 1rem;
    line-height: 1.1;
}

.public-brand small,
.footer-brand small {
    display: block;
    color: rgba(23, 58, 58, 0.72);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #173a3a 0%, #3e6b61 100%);
    color: #f4c95d;
    box-shadow: 0 16px 36px rgba(23, 58, 58, 0.18);
}

.public-navbar .nav-link {
    color: rgba(23, 58, 58, 0.72);
    font-weight: 700;
    padding: 0.6rem 0.95rem !important;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #173a3a;
    background: rgba(23, 58, 58, 0.08);
}

.public-toggler {
    border-color: rgba(23, 58, 58, 0.14);
}

.public-section {
    padding: 5.5rem 0;
}

.public-hero,
.public-page-hero {
    position: relative;
}

.public-hero::before,
.public-page-hero::before {
    content: '';
    position: absolute;
    inset: 40px auto auto 50%;
    width: min(560px, 92vw);
    height: 460px;
    background: linear-gradient(135deg, rgba(23, 58, 58, 0.08), rgba(244, 201, 93, 0.14));
    border-radius: 36px;
    transform: translateX(-50%) rotate(-3deg);
    z-index: 0;
}

.public-display,
.public-page-title {
    font-size: clamp(2.8rem, 5vw, 4.7rem);
    line-height: 0.98;
    margin: 0;
}

.public-page-title {
    font-size: clamp(2.5rem, 4.4vw, 4rem);
}

.public-eyebrow {
    display: inline-block;
    color: #c16a3d;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-weight: 800;
}

.public-lead,
.section-copy,
.section-heading p,
.cta-panel p,
.feature-panel p,
.journey-card p,
.value-card p,
.audience-card p,
.role-card p,
.contact-block p,
.contact-detail-card p,
.testimonial-card p,
.insight-card span,
.feedback-cta-card p,
.mini-highlight p {
    color: rgba(23, 58, 58, 0.78);
    font-size: 1.03rem;
    line-height: 1.8;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 1rem;
}

.section-heading.text-center {
    margin-left: auto;
    margin-right: auto;
}

.section-heading h2,
.section-title,
.cta-panel h2 {
    font-size: clamp(2rem, 3.3vw, 3rem);
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.btn-public-primary,
.btn-public-outline,
.btn-public-ghost {
    padding: 0.9rem 1.45rem;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.btn-public-primary {
    background: linear-gradient(135deg, #173a3a 0%, #28594f 100%);
    color: #fff;
    border: none;
    box-shadow: 0 18px 36px rgba(23, 58, 58, 0.18);
}

.btn-public-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, #102d2d 0%, #214a42 100%);
}

.btn-public-outline {
    background: transparent;
    color: #173a3a;
    border: 1px solid rgba(23, 58, 58, 0.18);
}

.btn-public-outline:hover {
    background: rgba(23, 58, 58, 0.08);
    color: #173a3a;
}

.btn-public-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: transparent;
}

.btn-public-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.hero-visual-card,
.content-image-card {
    position: relative;
    padding: 1rem;
    border-radius: 32px;
    background: rgba(255, 253, 248, 0.86);
    box-shadow: 0 28px 60px rgba(23, 58, 58, 0.14);
}

.hero-visual-card img,
.content-image-card img {
    width: 100%;
    display: block;
}

.hero-metrics,
.rating-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.hero-metric-card,
.rating-strip > div {
    padding: 1.1rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(23, 58, 58, 0.08);
    box-shadow: 0 12px 30px rgba(23, 58, 58, 0.08);
}

.hero-metric-card strong,
.rating-strip strong {
    display: block;
    font-size: 1.45rem;
}

.hero-metric-card span,
.rating-strip span,
.timeline-stat span,
.form-note,
.contact-inline-list span {
    color: rgba(23, 58, 58, 0.72);
    font-size: 0.92rem;
    line-height: 1.6;
}

.public-section-alt {
    background: rgba(255, 253, 248, 0.72);
    border-top: 1px solid rgba(23, 58, 58, 0.05);
    border-bottom: 1px solid rgba(23, 58, 58, 0.05);
}

.feature-panel,
.mini-highlight,
.value-card,
.audience-card,
.role-card,
.contact-detail-card,
.testimonial-card,
.timeline-stat,
.contact-info-card,
.contact-form-card,
.accent-panel,
.journey-card,
.insight-card,
.feedback-cta-card {
    border-radius: 28px;
    background: rgba(255, 253, 248, 0.92);
    border: 1px solid rgba(23, 58, 58, 0.08);
    box-shadow: 0 18px 40px rgba(23, 58, 58, 0.08);
}

.feature-panel,
.value-card,
.audience-card,
.role-card,
.contact-detail-card,
.testimonial-card,
.timeline-stat,
.journey-card,
.insight-card {
    padding: 2rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(23, 58, 58, 0.12), rgba(244, 201, 93, 0.34));
    color: #173a3a;
    font-size: 1.25rem;
}

.feature-panel h3,
.journey-card h3,
.value-card h3,
.audience-card h3,
.role-card h3,
.contact-detail-card h3,
.testimonial-card strong,
.mini-highlight strong,
.contact-info-card h2,
.contact-form-card h2,
.feedback-cta-card h3,
.accent-panel h3 {
    margin-bottom: 0.85rem;
}

.mini-highlight,
.contact-block {
    padding: 1.35rem 1.4rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(23, 58, 58, 0.07);
}

.journey-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: #173a3a;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.journey-card:hover {
    transform: translateY(-6px);
    color: #173a3a;
    box-shadow: 0 24px 48px rgba(23, 58, 58, 0.13);
}

.journey-badge,
.workflow-step span,
.avatar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 1rem;
    background: #173a3a;
    color: #fff;
    font-weight: 800;
}

.journey-link {
    color: #c16a3d;
    font-weight: 800;
}

.timeline-stat strong {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 2rem;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.95rem;
    color: rgba(23, 58, 58, 0.82);
    line-height: 1.7;
}

.check-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: #c16a3d;
}

.accent-panel {
    padding: 2.1rem;
    background: linear-gradient(180deg, rgba(23, 58, 58, 0.98), rgba(37, 84, 76, 0.94));
    color: #fff;
}

.accent-panel p,
.accent-kicker {
    color: rgba(255, 255, 255, 0.8);
}

.accent-panel-light {
    background: linear-gradient(180deg, #fffdf8, #f7f0e5);
    color: #173a3a;
}

.accent-panel-light p,
.accent-panel-light .accent-kicker {
    color: rgba(23, 58, 58, 0.74);
}

.accent-kicker {
    display: block;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    font-weight: 800;
}

.accent-tags,
.contact-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.accent-tags span,
.contact-inline-list a,
.contact-inline-list span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.accent-panel-light .accent-tags span {
    background: rgba(23, 58, 58, 0.08);
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.workflow-step {
    padding: 2rem 1.6rem;
    border-radius: 26px;
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(23, 58, 58, 0.08);
    box-shadow: 0 18px 40px rgba(23, 58, 58, 0.08);
}

.workflow-step h3 {
    font-size: 1.28rem;
    margin-bottom: 0.85rem;
}

.testimonial-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.avatar-badge {
    min-width: 56px;
    height: 56px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #c16a3d, #173a3a);
}

.testimonial-meta small {
    color: rgba(23, 58, 58, 0.62);
}

.insight-board {
    display: grid;
    gap: 1rem;
}

.feedback-cta-card,
.cta-panel {
    padding: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.public-cta-band {
    padding-top: 0;
}

.cta-panel {
    border-radius: 32px;
    background: linear-gradient(135deg, #173a3a 0%, #28594f 58%, #c16a3d 140%);
    color: #fff;
    box-shadow: 0 28px 60px rgba(23, 58, 58, 0.18);
}

.contact-info-card,
.contact-form-card {
    padding: 2rem;
    height: 100%;
}

.contact-block {
    margin-top: 1rem;
}

.contact-block a,
.footer-links a,
.footer-contact a,
.footer-bottom-links a,
.contact-inline-list a {
    color: #173a3a;
    text-decoration: none;
    font-weight: 700;
}

.contact-form-card .form-control,
.contact-form-card .form-select {
    min-height: 52px;
    border-radius: 16px;
    border-color: rgba(23, 58, 58, 0.14);
    background: rgba(255, 255, 255, 0.88);
}

.contact-form-card textarea.form-control {
    min-height: 160px;
}

.public-footer {
    padding: 1rem 0 2rem;
}

.public-footer .container {
    padding-top: 2rem;
}

.public-footer h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.footer-copy {
    margin-top: 1rem;
    color: rgba(23, 58, 58, 0.74);
    line-height: 1.75;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.75rem;
    color: rgba(23, 58, 58, 0.74);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(23, 58, 58, 0.08);
    color: rgba(23, 58, 58, 0.72);
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 1199px) {
    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .public-navbar .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 24px;
        background: rgba(255, 253, 248, 0.95);
    }

    .public-hero::before,
    .public-page-hero::before {
        height: 320px;
        top: 30px;
    }

    .cta-panel,
    .feedback-cta-card,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .public-section {
        padding: 4rem 0;
    }

    .hero-metrics,
    .rating-strip,
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual-card,
    .content-image-card,
    .feature-panel,
    .journey-card,
    .value-card,
    .audience-card,
    .role-card,
    .contact-info-card,
    .contact-form-card,
    .testimonial-card,
    .insight-card,
    .feedback-cta-card,
    .timeline-stat {
        border-radius: 22px;
    }

    .public-display,
    .public-page-title,
    .section-heading h2,
    .section-title,
    .cta-panel h2 {
        line-height: 1.08;
    }
}
