:root {
    --spine-bg: #241f1a;
    --spine-text: #c9b68c;
    --spine-gold: #b4975a;
    --paper-bg: #f7f3eb;
    --paper-white: #fcfaf6;
    --ink-primary: #2c241b;
    --ink-secondary: #5a4f45;
    --ink-muted: #8a7e72;
    --rule-color: #d6cbbc;
    --accent-burgundy: #7a3b45;
    --accent-blue: #3a6a7a;
    --accent-green: #3a7a5a;
    --shadow-book: 4px 0 30px rgba(0, 0, 0, 0.08);
    --transition: 0.25s ease;
    --sidebar-width: 280px;
    --header-height: 90px;
    --radius-book: 0px;
}

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

body {
    font-family: 'Merriweather', 'Georgia', serif;
    background: #dad2c4;
    display: flex;
    min-height: 100vh;
    color: var(--ink-primary);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 300px 300px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--spine-bg);
    color: var(--spine-text);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition);
    overflow-y: auto;
    border-right: 3px solid #3d352c;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    font-family: 'Cormorant Garamond', serif;
}

.sidebar::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 15%;
    height: 70%;
    width: 2px;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 8px,
            rgba(180, 150, 90, 0.12) 8px,
            rgba(180, 150, 90, 0.12) 10px);
    opacity: 0.5;
    pointer-events: none;
}

.sidebar-brand {
    padding: 28px 22px 18px 22px;
    border-bottom: 1px solid rgba(180, 150, 90, 0.18);
    flex-shrink: 0;
    text-align: center;
}

.sidebar-brand .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--spine-gold);
    gap: 4px;
}

.sidebar-brand .logo i {
    font-size: 30px;
    color: var(--spine-gold);
    background: rgba(180, 150, 90, 0.08);
    padding: 10px;
    border-radius: 50%;
    border: 1px solid rgba(180, 150, 90, 0.12);
}

.sidebar-brand .logo span {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 2px;
    color: #f0e3cf;
    font-family: 'Cormorant Garamond', serif;
}

.sidebar-brand .logo small {
    display: block;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.50;
    color: var(--spine-text);
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px 12px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-nav .nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.35;
    padding: 10px 16px 4px 16px;
    font-weight: 400;
    color: var(--spine-text);
    border-bottom: 1px solid rgba(180, 150, 90, 0.06);
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    border-radius: 0px;
    color: rgba(200, 185, 160, 0.70);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    margin-bottom: 1px;
}

.sidebar-nav a i {
    width: 22px;
    font-size: 16px;
    text-align: center;
    color: var(--spine-gold);
    opacity: 0.5;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    background: rgba(180, 150, 90, 0.07);
    color: #f0e3cf;
    border-left-color: var(--spine-gold);
}
.sidebar-nav a:hover i {
    opacity: 1;
}

.sidebar-nav a.active {
    background: rgba(180, 150, 90, 0.10);
    color: #f5ecd8;
    border-left-color: var(--spine-gold);
}
.sidebar-nav a.active i {
    opacity: 1;
    color: var(--spine-gold);
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(180, 150, 90, 0.10);
    font-size: 12px;
    opacity: 0.35;
    text-align: center;
    letter-spacing: 1px;
    font-family: 'Cormorant Garamond', serif;
    flex-shrink: 0;
}

.sidebar-footer-note {
    color:var(--spine-gold);
    font-size:7px;
    margin-right:6px;
}

.text-decoration-none {
    text-decoration: none;
}

/* ===== MAIN ===== */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--paper-bg);
    display: flex;
    flex-direction: column;
    position: relative;
}

.main::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.02), transparent);
    pointer-events: none;
    z-index: 2;
}

/* ===== HEADER ===== */
.header {
    height: var(--header-height);
    background: var(--paper-white);
    padding: 30px 30px 30px 0px;
    margin: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 100px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 50px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--ink-primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--transition);
}
.menu-toggle:hover {
    background: var(--rule-color);
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--paper-bg);
    border-radius: 0px;
    padding: 0 14px;
    border: 1px solid var(--rule-color);
    transition: all var(--transition);
    min-width: 200px;
    font-family: 'Merriweather', serif;
}
.header-search:focus-within {
    border-color: var(--spine-gold);
    background: var(--paper-white);
}
.header-search i {
    color: var(--ink-muted);
    font-size: 14px;
}
.header-search input {
    border: none;
    background: transparent;
    padding: 7px 10px;
    font-size: 14px;
    font-family: 'Merriweather', serif;
    width: 100%;
    outline: none;
    color: var(--ink-primary);
}
.header-search input::placeholder {
    color: var(--ink-muted);
    font-style: italic;
    font-size: 13px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right .date-badge {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    color: var(--ink-secondary);
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-right .date-badge i {
    color: var(--spine-gold);
    font-size: 14px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--paper-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--ink-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid var(--rule-color);
    font-family: 'Cormorant Garamond', serif;
}
.avatar:hover {
    border-color: var(--spine-gold);
}

.custom-scrollbar {
  scrollbar-width: thin;               /* Options: auto | thin | none */
  scrollbar-color: #888888 #f1f1f1;    /* thumb color | track color */
}

.custom-scrollbar::-webkit-scrollbar {
  width: 10px;                         /* Width of vertical scrollbar */
  height: 10px;                        /* Height of horizontal scrollbar */
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1; 
  border-radius: 5px;
}
 
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #888888; 
  border-radius: 5px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #555555; 
}

.m-top-8 {
    margin-top: 8px;
}

.m-top-16 {
    margin-top: 16px;
}

.bg-white {
    background-color: #ffffff;
}

.alert {
  /* Core structure and padding */
  position: relative;
  padding: 1rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* Success variant specific colors */
.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

/* Optional helper for links inside the alert */
.alert-success a, 
.alert-success .alert-link {
  color: #0a3622;
  font-weight: 700;
  text-decoration: underline;
}

/* Image Wrapper */
.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.image-wrapper img {
    width: 90%;
    height: auto;
    transition: transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
    cursor:zoom-in;
}

.text-uppercase {
    text-transform: uppercase;
}
