:root {
    --royal: #0B3B6F;
    --navy: #082544;
    --gold: #D4AF37;
    --gold-2: #b9962b;
    --white: #FFFFFF;
    --gray-50: #F5F7FA;
    --gray-100: #eef1f6;
    --gray-200: #e3e8ef;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --text: #0f172a;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(8, 37, 68, .06), 0 1px 3px rgba(8, 37, 68, .05);
    --shadow: 0 10px 30px -12px rgba(8, 37, 68, .18);
    --shadow-lg: 0 25px 60px -20px rgba(8, 37, 68, .35);
    --grad: linear-gradient(135deg, var(--navy) 0%, var(--royal) 50%, #1356a2 100%);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: var(--gray-50);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: "Poppins", "Inter", sans-serif;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--navy);
}

h1 {
    font-size: 2.1rem;
    margin: 0 0 .5rem;
}

h2 {
    font-size: 1.45rem;
    margin: 0 0 1rem;
}

a {
    color: var(--royal);
    text-decoration: none;
}

a:hover {
    color: var(--navy);
}

.muted {
    color: var(--gray-500);
}

.small {
    font-size: .85rem;
}

.center {
    text-align: center;
}

.gold {
    color: var(--gold);
}

.danger {
    color: #b91c1c;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 32px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.04);
}

.nav-inner {
    min-height: 92px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--navy);
    text-decoration: none;
    min-width: 280px;
}

.logo-mark {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
    border: 1px solid rgba(11, 59, 111, 0.08);
    box-shadow:
        0 18px 38px rgba(11, 59, 111, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo:hover .logo-mark {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 24px 46px rgba(11, 59, 111, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.02;
}

.logo-title {
    font-family: "Poppins", "Inter", sans-serif;
    font-size: 25px;
    font-weight: 800;
    color: var(--navy);
}

.logo-subtitle {
    margin-top: 5px;
    font-size: 15px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0;
}

.nav-links {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border-radius: 999px;
    background: rgba(245, 247, 250, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.nav-links a {
    height: 42px;
    padding: 0 15px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a i {
    font-size: 14px;
    color: #64748b;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--navy);
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.nav-links a:hover i {
    color: var(--gold);
}

.nav-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    color: var(--navy);
    background: #f1f5f9;
    font-size: 20px;
}

.notification-wrapper {
    position: relative;
}

.notification-icon-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.notification-icon-btn i {
    font-size: 18px;
}

.notification-icon-btn:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ef4444;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.notification-dropdown {
    position: absolute;
    top: 62px;
    right: 0;
    width: 390px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 22px 24px;
    border-bottom: 1px solid #eef2f7;
    background:
        linear-gradient(135deg, rgba(11, 59, 111, 0.05), rgba(212, 175, 55, 0.08));
}

.notification-header h4 {
    margin: 0;
    color: var(--navy);
    font-size: 20px;
    font-weight: 800;
}

.notification-header span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    margin-top: 8px;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.14);
}

.notification-content p {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.55;
}

.notification-content span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.notification-footer {
    padding: 16px 22px;
    text-align: center;
    background: #f8fafc;
}

.notification-footer a {
    color: #2563eb;
    font-weight: 800;
}

.empty-notifications {
    min-height: 150px;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #64748b;
    padding: 34px;
    text-align: center;
}

.empty-notifications i {
    font-size: 26px;
    color: #94a3b8;
}

.empty-notifications span {
    display: block;
    font-weight: 700;
}

.nav-user {
    height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--grad);
    font-size: 13px;
    font-weight: 900;
}

.hello {
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.logout-link,
.nav-login,
.nav-register {
    height: 48px;
    padding: 0 16px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.logout-link,
.nav-login {
    color: var(--navy);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.logout-link:hover,
.nav-login:hover {
    color: var(--navy);
    transform: translateY(-2px);
    background: #f8fafc;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.nav-register {
    color: #ffffff;
    background: var(--grad);
    box-shadow: 0 16px 28px rgba(11, 59, 111, 0.18);
}

.nav-register:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(11, 59, 111, 0.25);
}

.btn {
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    color: white;
}

.btn-gold {
    background: #f59e0b;
    color: white;
}

.btn-gold:hover {
    color: white;
}

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

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--gray-200);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 24px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.block {
    width: 100%;
}

.page {
    min-height: calc(100vh - 64px);
    padding: 24px 0 60px;
}

.section {
    margin: 36px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.link {
    color: var(--royal);
    font-weight: 700;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.link.danger {
    color: #b91c1c;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.row-end {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 64px 40px;
    color: #fff;
    margin-top: 18px;
    box-shadow: var(--shadow-lg);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--grad);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.eyebrow {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: 1.05;
    margin: 14px 0 12px;
}

.lede {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .85);
    max-width: 620px;
}

.hero-search {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 8px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
}

.hero-search input {
    flex: 1;
    background: transparent;
    border: 0;
    color: #fff;
    padding: 10px 14px;
    outline: none;
    font-size: 1rem;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, .7);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 34px;
    max-width: 560px;
}

.hero-stats div {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    padding: 12px;
}

.hero-stats strong {
    display: block;
    font-family: "Poppins";
    font-size: 1.4rem;
    color: #fff;
}

.hero-stats span {
    color: rgba(255, 255, 255, .7);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-books {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.book-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .2s ease;
    color: inherit;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: inherit;
}

.cover {
    position: relative;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--gray-100), #fff);
    overflow: hidden;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: "Poppins";
    font-size: 3rem;
    color: var(--royal);
    background: linear-gradient(135deg, var(--gray-100), #e6ecf5);
}

.cover-placeholder.big {
    font-size: 6rem;
    aspect-ratio: 3/4;
    position: static;
    border-radius: var(--radius);
}

.book-meta {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.book-meta h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--navy);
}

.tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--royal);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.badge.gold,
.badge-gold {
    background: #fef3c7;
    color: #b45309;
}

.badge.green {
    background: #dcfce7;
    color: #15803d;
}

.badge.red {
    background: #fee2e2;
    color: #b91c1c;
}

.badge.blue,
.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.gray {
    background: var(--gray-100);
    color: var(--gray-700);
}

.cover .badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--gray-200);
    color: var(--navy);
    font-weight: 600;
}

.chip:hover {
    border-color: var(--royal);
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    margin: 16px 0 24px;
    background: #fff;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.filters input,
.filters select {
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font: inherit;
    outline: none;
}

.filters input:focus,
.filters select:focus {
    border-color: var(--royal);
}

.auth-card {
    max-width: 440px;
    margin: 60px auto;
    padding: 34px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.glass {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .88rem;
    color: var(--gray-700);
    font-weight: 600;
}

.input,
.form input[type=text],
.form input[type=email],
.form input[type=password],
.form input[type=number],
.form select,
.form textarea {
    padding: 11px 13px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font: inherit;
    outline: none;
    background: #fff;
}

.input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--royal);
    box-shadow: 0 0 0 3px rgba(11, 59, 111, .1);
}

.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 10px;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-100);
}

.table th {
    background: var(--gray-50);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-700);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 14px 0 22px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.stat-card span {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray-500);
}

.stat-card strong {
    display: block;
    font-family: "Poppins";
    font-size: 1.8rem;
    color: var(--navy);
    margin-top: 4px;
}

.stat-card.red strong {
    color: #b91c1c;
}

.ranking {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gray-200);
}

.ranking li:last-child {
    border-bottom: 0;
}

.ranking strong {
    color: var(--royal);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.pagination {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    color: var(--gray-700);
}

.pagination a {
    color: var(--royal);
    font-weight: 700;
}

.flashes {
    position: fixed;
    top: 112px;
    right: 32px;
    z-index: 2000;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    pointer-events: none;
}

.flash {
    position: relative;
    padding: 16px 18px 16px 48px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    transform: translateX(0);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    pointer-events: auto;
}

.flash::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.flash-success {
    background: rgba(236, 253, 245, 0.96);
    border-color: #a7f3d0;
    color: #065f46;
}

.flash-success::before {
    background: #10b981;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.14);
}

.flash-danger {
    background: rgba(254, 242, 242, 0.96);
    border-color: #fecaca;
    color: #991b1b;
}

.flash-danger::before {
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.14);
}

.flash-warning {
    background: rgba(255, 251, 235, 0.96);
    border-color: #fde68a;
    color: #92400e;
}

.flash-warning::before {
    background: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.flash-info {
    background: rgba(239, 246, 255, 0.96);
    border-color: #bfdbfe;
    color: #1e40af;
}

.flash-info::before {
    background: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
}

.book-detail {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    margin-top: 24px;
}

.book-detail-cover img,
.book-detail-cover .cover-placeholder {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.book-detail-info h1 {
    margin-top: 8px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

.meta-grid div {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 10px 12px;
}

.meta-grid span {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray-500);
}

.meta-grid strong {
    display: block;
    color: var(--navy);
    margin-top: 2px;
}

.description {
    color: var(--gray-700);
    line-height: 1.7;
}

.reader {
    margin-top: 18px;
}

.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.reader-frame {
    height: 78vh;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background: #000;
}

.reader-frame iframe {
    width: 100%;
    height: 100%;
}

.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, .8);
    margin-top: 40px;
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer strong {
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
    font-family: "Poppins";
}

.footer .muted {
    color: rgba(255, 255, 255, .55);
    font-size: .85rem;
}

.dashboard-page,
.admin-dashboard-page {
    padding-bottom: 80px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
}

.page-subtitle {
    color: #64748b;
    font-size: 15px;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters-form {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    background: #fff;
    transition: 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: #f8fafc;
    padding: 16px;
    text-align: left;
    font-size: 14px;
    color: #475569;
}

.modern-table td {
    padding: 16px;
    border-top: 1px solid #eef2f7;
}

.table-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-page {
    padding: 40px 0;
}

.form-card {
    max-width: 1000px;
    margin: auto;
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

.form-header {
    margin-bottom: 35px;
}

.form-header h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 10px;
}

.form-header p {
    color: #64748b;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 700;
    color: #0f172a;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-actions {
    margin-top: 20px;
}

.modern-book-detail {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 50px;
    padding: 50px 0;
    align-items: start;
}

.detail-cover {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.detail-placeholder {
    width: 100%;
    height: 580px;
    border-radius: 24px;
    background: linear-gradient(135deg, #1e293b, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 120px;
    font-weight: 800;
}

.detail-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.detail-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 14px;
    color: #0f172a;
}

.detail-author {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 30px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.meta-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.meta-card span {
    display: block;
    color: #64748b;
    margin-bottom: 10px;
}

.meta-card strong {
    font-size: 18px;
}

.detail-description {
    margin-bottom: 35px;
}

.detail-description h3 {
    margin-bottom: 14px;
    font-size: 24px;
}

.detail-description p {
    line-height: 1.8;
    color: #475569;
}

.detail-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.modern-reviews-section {
    margin-top: 60px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.review-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.empty-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: #64748b;
}

.library-hero {
    padding: 80px 0 50px;
    text-align: center;
}

.library-hero-content {
    max-width: 850px;
    margin: auto;
}

.hero-badge {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 800;
    margin-bottom: 20px;
}

.library-hero h1 {
    font-size: 58px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #0f172a;
}

.library-hero p {
    font-size: 18px;
    line-height: 1.8;
    color: #64748b;
}

.library-page {
    padding-bottom: 60px;
}

.library-filters-card {
    background: white;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.06);
    margin-bottom: 40px;
}

.library-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-weight: 700;
    color: #0f172a;
}

.modern-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.modern-book-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    transition: 0.35s;
}

.modern-book-card:hover {
    transform: translateY(-8px);
}

.book-cover {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.book-placeholder {
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    font-size: 90px;
    font-weight: 800;
}

.book-card-content {
    padding: 24px;
}

.book-card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rating-badge {
    font-weight: 800;
    color: #f59e0b;
}

.book-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

.book-title a {
    color: #0f172a;
}

.book-author {
    color: #64748b;
    margin-bottom: 16px;
}

.book-description {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 24px;
    min-height: 72px;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.availability {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #64748b;
}

.empty-library {
    background: white;
    border-radius: 28px;
    padding: 80px 40px;
    text-align: center;
}

.modern-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
}

.pagination-btn {
    padding: 12px 20px;
    border-radius: 14px;
    background: white;
    color: #0f172a;
    font-weight: 700;
}

.pagination-info {
    color: #64748b;
}

.modern-reader-page {
    padding: 40px 0 80px;
}

.reader-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.reader-book-info h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 10px;
}

.reader-book-info p {
    color: #64748b;
    font-size: 17px;
}

.reader-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 800;
    margin-bottom: 14px;
}

.reader-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.reader-btn {
    padding: 12px 18px;
    border-radius: 14px;
    background: white;
    border: none;
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.back-btn {
    background: #0f172a;
    color: white;
}

.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 24px;
    background: white;
    margin-bottom: 30px;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 12px;
}

.toolbar-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: #f1f5f9;
    font-weight: 800;
    cursor: pointer;
}

.page-indicator {
    font-size: 17px;
    font-weight: 800;
}

.pdf-viewer-container {
    position: relative;
    background: #0f172a;
    border-radius: 30px;
    padding: 40px;
    overflow: auto;
    text-align: center;
    min-height: 800px;
}

#pdf-render {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    transition: 0.25s;
}

.reader-footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: white;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.info-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

.info-card span {
    color: #64748b;
    line-height: 1.7;
}

.reader-dark-mode {
    background: #020617 !important;
}

.reader-dark-mode .reader-book-info h1,
.reader-dark-mode .page-indicator {
    color: white;
}

.reader-dark-mode .reader-book-info p {
    color: #94a3b8;
}

.reader-dark-mode .pdf-toolbar,
.reader-dark-mode .info-card,
.reader-dark-mode .reader-btn {
    background: #111827;
    color: white;
}

.reader-dark-mode .toolbar-btn {
    background: #1e293b;
    color: white;
}

.review-form-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.review-form-card h3 {
    margin-bottom: 24px;
    font-size: 28px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rating-select,
.review-comment {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pdf-loader {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
    color: white;
    border-radius: 30px;
}

.loader-spinner {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid white;
    animation: spin 1s linear infinite;
}

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

.reading-progress-wrapper {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: 0.3s;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.analytics-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.mini-stat {
    background: #f8fafc;
    border-radius: 20px;
    padding: 24px;
}

.mini-stat span {
    display: block;
    color: #64748b;
    margin-bottom: 10px;
}

.mini-stat strong {
    font-size: 32px;
    font-weight: 800;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.activity-item p {
    margin-top: 6px;
    color: #64748b;
}

.category-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.category-bar-bg {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.category-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.admin-dashboard-revamp {
    padding-top: 10px;
}

.dashboard-hero-admin {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
    padding: 30px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
        linear-gradient(135deg, rgba(11, 59, 111, 0.08), rgba(20, 184, 166, 0.08));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.dashboard-hero-copy h1 {
    max-width: 780px;
    margin: 12px 0 10px;
    color: var(--navy);
    font-size: 38px;
    line-height: 1.08;
}

.dashboard-hero-copy p {
    max-width: 700px;
    margin: 0 0 22px;
    color: #52647a;
    font-size: 16px;
}

.dashboard-hero-admin .eyebrow {
    color: var(--royal);
    background: rgba(11, 59, 111, 0.08);
    border-color: rgba(11, 59, 111, 0.12);
}

.dashboard-hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.hero-mini-stat {
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.hero-mini-stat span,
.admin-summary-grid .stat-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-mini-stat strong {
    display: block;
    margin-top: 6px;
    color: var(--navy);
    font-size: 34px;
    line-height: 1;
}

.hero-mini-stat small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-weight: 700;
}

.admin-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}

.admin-summary-grid .stat-card,
.stat-card-link {
    min-height: 128px;
    color: inherit;
    text-decoration: none;
}

.admin-summary-grid .stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(11, 59, 111, 0.18);
}

.admin-layout-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.admin-panel {
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.admin-panel-wide {
    grid-column: span 2;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.panel-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.compact-ranking,
.compact-chart,
.compact-activity-list {
    margin-top: 0;
}

.compact-item {
    gap: 14px;
}

.admin-panel .ranking-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ranking-meta {
    min-width: 0;
}

.ranking-meta strong,
.compact-table td strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--navy);
    line-height: 1.35;
}

.distribution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.distribution-grid .mini-stat {
    margin: 0;
    padding: 20px;
    border-radius: 16px;
}

.mini-stat-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mini-stat-link:hover {
    transform: translateY(-2px);
    border-color: rgba(11, 59, 111, 0.18);
    box-shadow: var(--shadow-sm);
}

.logs-hero {
    margin-bottom: 18px;
}

.logs-toolbar-panel {
    margin-bottom: 18px;
}

.logs-toolbar {
    align-items: center;
}

.logs-search-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    max-width: 760px;
}

.search-shell {
    flex: 1 1 320px;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-shell i {
    color: #64748b;
    font-size: 14px;
}

.search-shell input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--navy);
    font-size: 15px;
    font-weight: 700;
}

.search-shell input::placeholder {
    color: #94a3b8;
    font-weight: 600;
}

.logs-table-wrap {
    border-radius: 18px;
}

.logs-table tbody tr td {
    vertical-align: middle;
}

.log-actor {
    display: flex;
    align-items: center;
    gap: 12px;
}

.log-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(20, 184, 166, 0.18));
    color: var(--navy);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.log-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fbff;
    color: var(--navy);
    font-weight: 800;
    line-height: 1.45;
}

.log-action-chip i {
    color: #0ea5e9;
    font-size: 9px;
}

.logs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.pagination-status {
    color: #64748b;
    font-weight: 800;
}

.btn.disabled {
    pointer-events: none;
    opacity: 0.55;
}

.admin-statistics-page .section-header {
    margin-bottom: 24px;
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.statistics-kpi-grid {
    margin-bottom: 24px;
}

.statistics-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr) minmax(280px, 0.65fr);
    gap: 18px;
    margin-bottom: 18px;
}

.analytics-wide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.analytics-spotlight {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 330px;
    background:
        linear-gradient(135deg, rgba(11, 59, 111, 0.96), rgba(13, 94, 126, 0.9)),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.5), transparent 34%);
    color: #ffffff;
    overflow: hidden;
}

.analytics-spotlight .eyebrow {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.analytics-spotlight h2 {
    max-width: 560px;
    margin: 18px 0 10px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.08;
}

.analytics-spotlight p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.health-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.health-score {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.health-score span,
.pipeline-card span,
.chart-rank-label span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.health-score span {
    color: rgba(255, 255, 255, 0.72);
}

.health-score strong {
    display: block;
    margin-top: 8px;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
}

.health-score small {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.chart-panel {
    overflow: hidden;
}

.donut-chart {
    --first: 50;
    --second: 25;
    width: min(220px, 76vw);
    aspect-ratio: 1;
    margin: 18px auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(
            #2563eb 0 calc(var(--first) * 1%),
            #14b8a6 calc(var(--first) * 1%) calc((var(--first) + var(--second)) * 1%),
            #f59e0b calc((var(--first) + var(--second)) * 1%) 100%
        );
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 22px 48px rgba(37, 99, 235, 0.15);
}

.donut-chart.collection-donut {
    background:
        conic-gradient(
            #0b3b6f 0 calc(var(--first) * 1%),
            #2dd4bf calc(var(--first) * 1%) 100%
        );
}

.donut-chart > div {
    width: 62%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.donut-chart strong {
    color: var(--navy);
    font-size: 34px;
    line-height: 1;
}

.donut-chart span {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.chart-legend {
    display: grid;
    gap: 10px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #475569;
    font-weight: 800;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.blue { background: #2563eb; }
.legend-dot.teal { background: #14b8a6; }
.legend-dot.gold { background: #f59e0b; }
.legend-dot.navy { background: #0b3b6f; }
.legend-dot.mint { background: #2dd4bf; }

.stacked-meter {
    display: flex;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.stacked-meter span {
    min-width: 2px;
}

.meter-pending { background: #2563eb; }
.meter-queued { background: #f59e0b; }
.meter-approved { background: #10b981; }
.meter-rejected { background: #ef4444; }

.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.pipeline-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.pipeline-card strong {
    display: block;
    margin-top: 8px;
    color: var(--navy);
    font-size: 28px;
}

.horizontal-bars {
    display: grid;
    gap: 18px;
}

.hbar-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 44px;
    gap: 14px;
    align-items: center;
}

.hbar-row span {
    color: #475569;
    font-weight: 900;
}

.hbar-row div {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}

.hbar-row i {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.hbar-row.warning i {
    background: linear-gradient(90deg, #f59e0b, #facc15);
}

.hbar-row.danger i {
    background: linear-gradient(90deg, #ef4444, #fb7185);
}

.hbar-row strong {
    color: var(--navy);
    text-align: right;
}

.chart-rank-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.2fr) minmax(120px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}

.chart-rank-row:last-child {
    border-bottom: 0;
}

.chart-rank-label {
    min-width: 0;
}

.chart-rank-label strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--navy);
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.chart-rank-label span {
    margin-top: 5px;
}

.chart-rank-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}

.chart-rank-track i {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.chart-rank-track.teal i {
    background: linear-gradient(90deg, #14b8a6, #5eead4);
}

.chart-rank-track.red i {
    background: linear-gradient(90deg, #ef4444, #fb7185);
}

.chart-rank-track.gold i {
    background: linear-gradient(90deg, #f59e0b, #facc15);
}

.chart-rank-row b {
    color: var(--navy);
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

.modern-table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid #eef2f7;
    border-radius: 16px;
}

.compact-table {
    margin: 0;
    box-shadow: none;
}

.compact-table th,
.compact-table td {
    padding: 13px 14px;
    vertical-align: top;
}

.compact-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.compact-activity-item {
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
}

.compact-activity-item strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.auth-page .auth-card {
    width: 100%;
    max-width: 520px;
    background: white;
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 90px;
    height: 90px;
    margin: auto;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-size: 36px;
    margin-bottom: 24px;
}

.auth-logo.gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.auth-header h1 {
    font-size: 38px;
    margin-bottom: 14px;
    color: #0f172a;
}

.auth-header p {
    color: #64748b;
    line-height: 1.7;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-error {
    color: #dc2626;
    font-size: 14px;
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
}

.auth-footer a {
    color: #2563eb;
    font-weight: 800;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.language-wrapper {
    position: relative;
}

.language-icon-btn {
    height: 48px;
    min-width: 72px;
    padding: 0 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.language-icon-btn i {
    font-size: 17px;
    color: var(--royal);
}

.language-icon-btn:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.language-dropdown {
    position: absolute;
    top: 62px;
    right: 0;
    width: 220px;
    padding: 8px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown a {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 13px;
    display: grid;
    grid-template-columns: 42px 1fr 16px;
    align-items: center;
    gap: 8px;
    color: #334155;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.language-dropdown a:hover,
.language-dropdown a.active {
    color: var(--navy);
    background: #f8fafc;
}

.language-code {
    height: 28px;
    min-width: 38px;
    padding: 0 8px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--grad);
    font-size: 12px;
    font-weight: 900;
}

.language-label {
    font-size: 14px;
    font-weight: 800;
}

.language-dropdown i {
    color: #16a34a;
    font-size: 13px;
}


/* Auth Pages General Styles */
.auth-container {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
                radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.05) 0%, transparent 40%);
}

.auth-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.auth-logo.gold {
    background: linear-gradient(135deg, #d4af37, #f1c40f);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.auth-header h1 {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: white;
}

.form-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary-auth {
    background: #4f46e5;
    color: white;
}

.btn-primary-auth:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-gold-auth {
    background: #d4af37;
    color: white;
}

.btn-gold-auth:hover {
    background: #b8962e;
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.university-auth-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(11, 59, 111, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
}

.university-auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--royal), var(--gold), #14b8a6);
}

.auth-card-wide {
    max-width: 760px;
}

.auth-form-grid,
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.auth-form-grid .form-group {
    margin-bottom: 0;
}

.admin-user-form-shell {
    display: flex;
    justify-content: center;
}

.admin-user-form-card {
    width: min(940px, 100%);
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.form-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 10px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f7;
}

.form-section-title span {
    color: var(--gold-2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.form-section-title strong {
    color: var(--navy);
    font-size: 18px;
}

.admin-form-note {
    margin: -6px 0 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.admin-user-form-card .row-end {
    margin-top: 24px;
}





@media (max-width: 1180px) {
    .dashboard-hero-admin,
    .admin-layout-grid {
        grid-template-columns: 1fr 1fr;
    }

    .statistics-showcase-grid,
    .analytics-wide-grid {
        grid-template-columns: 1fr 1fr;
    }

    .analytics-spotlight {
        grid-column: span 2;
    }

    .dashboard-hero-copy,
    .dashboard-hero-stats {
        grid-column: span 2;
    }

    .admin-summary-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .admin-panel {
        grid-column: span 1;
    }

    .admin-panel-wide {
        grid-column: span 2;
    }

    .nav-inner {
        grid-template-columns: auto auto 1fr;
    }

    .mobile-menu-btn {
        display: grid;
        place-items: center;
        order: 2;
    }

    .logo {
        min-width: auto;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 12px);
        left: 32px;
        right: 32px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px;
        border-radius: 22px;
        background: white;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        justify-content: flex-start;
        height: 48px;
        border-radius: 14px;
    }

    .nav-actions {
        justify-self: end;
        order: 3;
    }
}

@media (max-width: 860px) {
    .dashboard-hero-admin,
    .admin-layout-grid,
    .admin-summary-grid,
    .statistics-showcase-grid,
    .analytics-wide-grid,
    .pipeline-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-copy,
    .dashboard-hero-stats,
    .admin-panel,
    .admin-panel-wide,
    .analytics-spotlight {
        grid-column: auto;
    }

    .dashboard-hero-admin {
        padding: 22px;
    }

    .dashboard-hero-copy h1 {
        font-size: 30px;
    }

    .container {
        padding: 0 18px;
    }

    .nav-inner {
        min-height: 82px;
        gap: 12px;
    }

    .logo-mark {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }

    .logo-title {
        font-size: 19px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .hello {
        display: none;
    }

    .nav-user {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .logout-link span {
        display: none;
    }

    .logout-link {
        width: 48px;
        padding: 0;
    }

    .notification-dropdown {
        right: -80px;
        width: 340px;
    }

    .hero {
        padding: 42px 24px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters {
        grid-template-columns: 1fr 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .book-detail {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .modern-book-detail {
        grid-template-columns: 1fr;
    }

    .detail-title {
        font-size: 38px;
    }

    .library-filters {
        grid-template-columns: 1fr;
    }

    .library-hero h1 {
        font-size: 42px;
    }

    .modern-book-grid {
        grid-template-columns: 1fr;
    }

    .reader-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .reader-book-info h1 {
        font-size: 30px;
    }

    .pdf-viewer-container {
        padding: 20px;
    }

    .auth-page .auth-card {
        padding: 32px 24px;
    }

    .auth-header h1 {
        font-size: 30px;
    }

    .auth-form-grid,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-user-form-card {
        padding: 22px;
    }

    .health-score-grid {
        grid-template-columns: 1fr;
    }

    .chart-rank-row,
    .hbar-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chart-rank-row b,
    .hbar-row strong {
        text-align: left;
    }

    .analytics-spotlight h2 {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .flashes {
        top: 92px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

@media (max-width: 560px) {
    .logo-text {
        display: none;
    }

    .mobile-menu-btn,
    .notification-icon-btn,
    .logout-link {
        width: 44px;
        height: 44px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-links {
        left: 18px;
        right: 18px;
    }

    .notification-dropdown {
        right: -118px;
        width: calc(100vw - 36px);
    }

    .hero {
        padding: 36px 18px;
        border-radius: 18px;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-form {
        flex-direction: column;
    }

    .modern-table {
        display: block;
        overflow-x: auto;
    }

    .form-card {
        padding: 24px;
    }

    .analytics-cards {
        grid-template-columns: 1fr;
    }
}
