/* ================================
   General Layout
================================ */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f9fafb;
    margin: 0;
    padding: 0;
}

/* ================================
   Navbar
================================ */
.navbar-brand img {
    max-height: 40px;
    height: auto;
    width: auto;
}

/* ================================
   Sidebar
================================ */
.sidebar-desktop {
    width: 240px;
    height: calc(100vh - 70px);
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    position: fixed;
    top: 70px;   /* sits just under navbar */
    left: 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-section {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #6c757d;
    margin: 1rem 0 0.25rem 0.75rem;
}

.sidebar-desktop .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    border-radius: 0.375rem;
}
.sidebar-desktop .nav-link:hover,
.sidebar-desktop .nav-link.active {
    background-color: #e9ecef;
    color: #0d6efd;
    font-weight: 600;
}
.sidebar-desktop .nav-link i {
    margin-right: 8px;
    flex-shrink: 0;
}

/* --- Auth Pages --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 2rem;
}
.auth-logo {
    display: block;
    margin: 0 auto 1rem auto;
    width: 250px;
    height: auto;
}
.auth-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
}
.auth-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 1rem;
}

.auth-card .form-control {
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
}

.auth-card .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    border-radius: 8px;
    font-weight: 500;
}

.auth-card .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}


/* ================================
   Main Content Wrapper
================================ */
.content-wrapper {
    margin-left: 240px;   /* leave space for sidebar */
    margin-top: 70px;     /* leave space for navbar */
    padding: 2rem;
    min-height: calc(100vh - 70px);

    display: flex;
    justify-content: center; /* center content horizontally */
}

/* Inner box (card style for all content) */
.content-inner {
    width: 100%;
    max-width: 1400px;   /* stretch but keep readable */
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ================================
   Tables
================================ */
.table td,
.table th {
    vertical-align: middle !important;
}

/* Normalize action buttons */
.table td .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Make sure actions column stays tight */
.table td:last-child {
    white-space: nowrap;
    text-align: center;
}

/* ================================
   Flash messages
================================ */
.alert {
    margin-top: 1rem;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    margin-bottom: 1rem;
}

/* ================================
   Mobile Adjustments
================================ */
@media (max-width: 991.98px) {
    .sidebar-desktop {
        display: none;
    }
    .content-wrapper {
        margin-left: 0;
        margin-top: 70px;
        padding: 1rem;
    }
    .content-inner {
        max-width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        max-width: 180px;
    }
}


/* Announcement form consistency */
.card-header {
  border-bottom: 1px solid #e9ecef;
}

.card-header h2 {
  color: #555;
}

form .form-label {
  font-weight: 500;
  color: #333;
}

form .btn-primary {
  border-radius: 0.375rem;
  padding: 0.5rem 1.5rem;
}

form textarea.form-control {
  min-height: 300px;
}

h1.h5 i {
  margin-right: 6px;
  color: #0d6efd;
}

/* Announcements form polish */
.card-header { border-bottom: 1px solid #e9ecef; }
.card-header h2 { color: #555; }
form .form-label { font-weight: 500; color: #333; }
form .btn-primary { border-radius: .375rem; padding: .5rem 1.25rem; }
h1.h5 i { margin-right: 6px; color: #0d6efd; }

.book-title {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Wrap title to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3rem; /* keeps consistent card height */
  line-height: 1.2;
  word-break: break-word;
}

.card-header h5 {
  font-weight: 600;
}
.card-body {
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}
textarea.form-control {
  font-family: "Segoe UI", Roboto, sans-serif;
}

