/* --- ADMIN DASHBOARD STYLES --- */

.admin-wrapper {
    max-width: 800px; /* Increased from 600px for card action button clearance */
    margin: 20px auto;
    padding: 0 16px;
}

  
  /* Welcome Hero Banner */
  .admin-hero {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: url('./assets/images/web/admin_hero.png') center center / cover no-repeat;
    box-shadow: 0 10px 25px -5px rgba(29, 78, 216, 0.25);
    margin-bottom: 24px;
    direction: rtl;
  }

.admin-hero-overlay {
    width: 100%;
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.2) 0%, rgba(15, 23, 42, 0.45) 100%);
    padding: 36px 28px 24px 28px;
    box-sizing: border-box;
}
  
  .admin-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
  }

 /* Centered Title */
.admin-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 28px 0;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}
  
 /* Bottom Metadata Bar */
.admin-hero-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Badge on far right, Display Name on far left */
  }
  
  /* White Pill Badge for Admin Role */
.admin-badge {
    background-color: #ffffff;
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  /* Mobile Responsiveness */
@media (max-width: 576px) {
    .admin-hero-overlay {
      padding: 28px 18px 20px 18px;
    }
  
    .admin-hero-title {
      font-size: 1.75rem;
      margin-bottom: 20px;
    }
  
    .admin-badge {
      font-size: 0.8rem;
      padding: 5px 14px;
    }
  
    .admin-display-name {
      font-size: 0.92rem;
    }
  }
  
/* Display Name Text on the Left */
.admin-display-name {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  }
  
  /* 4-Tab Top Navigation Grid */
  .admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
    background: #ffffff;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  
  .admin-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1d4ed8;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .admin-tab-btn:hover {
    background-color: #f1f5f9;
  }
  
  .admin-tab-btn.active {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
  }
  
  .admin-tab-btn svg {
    width: 22px;
    height: 22px;
  }
  
  /* Custom PNG Icon Sizing inside Admin Nav Buttons */
.admin-tab-btn .tab-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
  }
  
  .admin-tab-btn:hover .tab-icon-img {
    transform: scale(1.1);
  }
  
  /* Tab Sections */
  .tab-section {
    display: none;
  }
  
  .tab-section.active {
    display: block;
  }
  
  .admin-tab-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Keeps both elements flush with top of white card */
    margin-bottom: 0 !important;
  }
  
  #addChangelogBtn {
    margin-bottom: 8px !important;
    border-radius: 10px !important;
  }

  .tab-header-badge {
  display: inline-block;
  background: #1d4ed8;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 12px 12px 0 0;
  font-size: 0.95rem;
  margin-bottom: 0 !important;
}
  
  /* Ensure white card connects flush below ribbon */
  .tab-card-body {
    background: #ffffff;
    border-radius: 0 16px 16px 16px; /* Flat top-right corner connects cleanly to ribbon */
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 250px;
  }
  
  /* Form Controls */
  .admin-form-group {
    margin-bottom: 16px;
  }
  
  .admin-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1e293b;
  }
  
  .admin-input,
  .admin-select {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
  }
  
  .admin-btn-submit {
    width: 100%;
    background: #1d4ed8;
    color: #ffffff;
    border: none;
    padding: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  
  .admin-btn-submit:hover {
    background: #1e40af;
  }
  
  /* Student Table */
  .admin-table-wrapper {
    overflow-x: auto;
  }
  
  .admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
  }
  
  .admin-table th, 
  .admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
  }
  
  .admin-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
  }
  
  .btn-view-profile {
    background: #1d4ed8;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
  }
  
  .text-restricted {
    color: #94a3b8;
    font-size: 0.8rem;
  }
  
  /* --- MODAL OVERLAY FIX --- */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none; /* Keeps modal hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
  }
  
  .admin-modal-overlay.show {
    display: flex !important; /* Shows modal only when triggered */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
  }
  
  .admin-modal-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* --- FULL MASTER BOOK CARD STYLING --- */

.admin-book-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
  }
  
  .admin-book-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .admin-book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  }
  
  /* Right Section: Info & Cover Image */
  .admin-card-right {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: right;
  }
  
  .admin-card-cover {
    width: 52px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  }
  
  .admin-book-details .admin-book-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
  }
  
  .admin-book-details .admin-book-author {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2563eb;
    margin: 0 0 4px 0;
  }
  
  .admin-book-details .admin-book-subject {
    font-size: 0.78rem;
    color: #94a3b8;
  }
  
  /* Left Section: Dark Circle Action Buttons */
  .admin-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .btn-circle-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #0f172a; /* Dark Navy matching screenshot */
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .btn-circle-action:hover {
    background: #2563eb; /* Highlight Blue */
    transform: scale(1.08);
  }
  
  .btn-circle-action.delete:hover {
    background: #dc2626; /* Warning Red for Delete */
  }
  
  .action-divider {
    width: 1px;
    height: 24px;
    background-color: #cbd5e1;
    margin: 0 4px;
  }

  /* --- FANCY SEARCH BAR STYLING --- */

.fancy-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 320px;
  }
  
  .fancy-search-wrapper .search-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
  }
  
  .fancy-search-input {
    width: 100%;
    padding: 10px 42px 10px 38px; /* Padding accommodates search icon (right) & clear icon (left) */
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  }
  
  .fancy-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
  }
  
  /* Hover & Focus States */
  .fancy-search-input:hover {
    background: #ffffff;
    border-color: #cbd5e1;
  }
  
  .fancy-search-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  
  .fancy-search-wrapper:focus-within .search-icon {
    color: #2563eb; /* Highlights icon blue when input is active */
  }
  
  /* Clear (x) Button */
  .clear-search-btn {
    position: absolute;
    left: 10px;
    background: #cbd5e1;
    color: #ffffff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    display: none; /* Hidden by default until user types */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  
  .clear-search-btn:hover {
    background: #64748b;
    transform: scale(1.1);
  }
  
  .clear-search-btn.show {
    display: flex;
  }

  /* Database Card Header Spacing */
.database-card-header {
    display: flex;
    justify-content: flex-end; /* Aligns search bar to the right (RTL layout) */
    margin-bottom: 16px;
  }
  
  .database-card-header .fancy-search-wrapper {
    max-width: 320px;
    width: 100%;
  }

  /* --- GENDER TAB SWITCHER WITH SVGs --- */

.gender-db-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .gender-tab-btn {
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 10px 18px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.55; /* Dimmed inactive state */
    transform: translateY(2px);
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Spacing between label and SVG */
  }
  
  .gender-tab-svg {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
  }
  
  /* Male Tab (Blue) */
  .gender-tab-btn.male-tab {
    background-color: #1d4ed8;
    color: #ffffff;
  }
  
  /* Female Tab (Pink) */
  .gender-tab-btn.female-tab {
    background-color: #db2777; /* Bright Rose Pink */
    color: #ffffff;
  }
  
  /* Active State */
  .gender-tab-btn.active {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
  }
  
  .gender-tab-btn:hover:not(.active) {
    opacity: 0.8;
  }

  /* --- STREAMLINED STUDENT LIST ROW --- */
.student-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }
  
  .student-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
  }
  
  .student-row-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
  
  .student-row-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .student-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e2e8f0;
  }
  
  .student-list-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
  }
  
  .btn-view-profile-card {
    background-color: #1d4ed8;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .btn-view-profile-card:hover {
    background-color: #1e40af;
  }
  
  /* Restricted view label for standard admins */
  .text-restricted-badge {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    background-color: #f8fafc;
    padding: 4px 10px;
    border-radius: 6px;
  }
  
  /* --- MATCHING PROFILE MODAL STYLING --- */

.profile-preview-card {
    text-align: center;
    padding: 28px 24px 20px 24px;
  }
  
  .profile-preview-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px auto;
    display: block;
    border: 3px solid #1d4ed8;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
  }
  
  .profile-preview-card .profile-label-top {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
  }
  
  .profile-preview-card .profile-user-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
  }
  
  /* Gender Badge Styling inside Modal */
  .gender-badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
  }
  
  .gender-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
  }
  
  .gender-badge.gender-male {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
  }
  
  .gender-badge.gender-female {
    background-color: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
  }
  
  .profile-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0;
  }
  
  /* Detail Rows Layout */
  .profile-preview-card .profile-details-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  
  .profile-preview-card .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
  }
  
  .profile-preview-card .detail-label {
    color: #64748b;
    font-weight: 600;
    text-align: right;
  }
  
  .profile-preview-card .detail-value {
    color: #0f172a;
    font-weight: 700;
    direction: ltr;
    text-align: left;
  }
  
  /* ==========================================
   PRESENTATION & ARCHIVE ROW CARDS FIX
   ========================================== */

/* 1. Ensure the right container shrink-wraps and handles text truncation */
.book-row-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0; /* CRITICAL: Allows flex child text elements to wrap/truncate instead of pushing layout */
  }
  
  /* 2. Constrain details text block and add padding before divider/buttons */
  .book-row-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-left: 12px; /* Generates physical breathing room before the action buttons */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* 3. Wrap long titles gracefully on small mobile screens */
  .book-row-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    white-space: normal; /* Allows text to drop to a 2nd line instead of overlapping buttons */
  }
  
  /* 4. Ensure action buttons stay anchored to the left without shrinking */
  .book-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Prevents action icons from compressing when text gets long */
  }
  
  /* ==========================================
   DEDICATED MOBILE OPTIMIZATION (< 576px)
   ========================================== */

@media (max-width: 576px) {
    /* 1. Stack the card container cleanly */
    .book-row-card {
      flex-direction: column !important;
      align-items: stretch !important;
      padding: 14px 16px !important;
      gap: 12px !important;
    }
  
    /* 2. Top section: Cover/Thumbnail + Details side by side */
    .book-row-right {
      width: 100% !important;
      display: flex !important;
      align-items: center !important;
      gap: 12px !important;
    }
  
    .book-row-cover {
      width: 60px !important;
      height: 44px !important;
      object-fit: cover !important;
      border-radius: 6px !important;
      flex-shrink: 0 !important;
    }
  
    .book-row-details {
      padding-left: 0 !important;
      width: 100% !important;
    }
  
    .book-row-title {
      font-size: 0.92rem !important;
      line-height: 1.4 !important;
      white-space: normal !important;
      word-break: break-word !important;
    }
  
    /* 3. Bottom section: Action buttons on their own row, aligned nicely */
    .book-row-actions {
      width: 100% !important;
      display: flex !important;
      justify-content: flex-end !important;
      gap: 10px !important;
      padding-top: 8px !important;
      border-top: 1px dashed #f1f5f9 !important; /* Subtle separator line */
    }
  
    .action-icon-btn {
      width: 36px !important;
      height: 36px !important;
    }
  }
  
  /* --- EXTENDED ACTION BUTTONS FOR ADMIN CARDS --- */

.book-row-actions.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    margin-right: 8px;
    border-right: 2px solid #e2ebd8;
  }
  
  .admin-action-divider {
    width: 1px;
    height: 22px;
    background-color: #cbd5e1;
    margin: 0 4px;
  }
  
  /* Edit Button Hover State */
  .action-icon-btn.admin-btn-edit:hover {
    background-color: #2563eb !important; /* Blue Highlight */
    transform: scale(1.08);
  }
  
  /* Delete Button Hover State */
  .action-icon-btn.admin-btn-delete:hover {
    background-color: #dc2626 !important; /* Red Warning */
    transform: scale(1.08);
  }
  
  /* ==========================================
   TAB 3: PENDING APPROVALS LIST STYLES
   ========================================== */

/* Container wrapping all pending items */
.pending-books-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  /* Individual Pending Book Row Card */
  .pending-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
  }
  
  .pending-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  }
  
  /* Left Side: Cover Image & Text Meta */
  .pending-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  
  .pending-book-cover {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
  }
  
  .pending-book-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .pending-book-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
  }
  
  .pending-book-meta {
    font-size: 0.82rem;
    color: #64748b;
  }
  
  /* Right Side: Action Buttons */
  .pending-action-btns {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Action Icon Preview Button */
  .btn-view-pending {
    color: #64748b;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }
  
  .btn-view-pending:hover {
    background: #e2e8f0;
    color: #0f172a;
  }
  
  /* Approve Button */
  .btn-approve {
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .btn-approve:hover {
    background-color: #059669;
  }
  
  /* Reject Button */
  .btn-reject {
    background-color: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .btn-reject:hover {
    background-color: #dc2626;
  }
  
  /* Responsive adjustment for small mobile screens */
  @media (max-width: 576px) {
    .pending-item-card {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
  
    .pending-action-btns {
      width: 100%;
      justify-content: flex-end;
    }
  }

  /* ==========================================
   CUSTOM MODALS & OVERLAYS (Reject / Delete)
   ========================================== */

/* Fullscreen dimmed overlay */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  
  /* Modal visibility trigger */
  .admin-modal-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  
  /* Card container inside modal */
  .admin-modal-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
    text-align: right;
  }
  
  .admin-modal-overlay.show .admin-modal-card {
    transform: translateY(0) scale(1);
  }

  /* ==========================================
   ACCESS DENIED MODAL & BLUR STYLES
   ========================================== */

/* Darkened Heavy Blur Backdrop */
.access-denied-overlay {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 99999 !important;
  }
  
  /* Modal Card */
  .access-denied-card {
    text-align: center !important;
    max-width: 400px !important;
    padding: 32px 24px !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid #f1f5f9;
  }
  
  .access-denied-icon {
    width: 64px;
    height: 64px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
  }
  
  .access-denied-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
  }
  
  .access-denied-text {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
  }
  
  .btn-return-home {
    width: 100%;
    background-color: #1d4ed8;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .btn-return-home:hover {
    background-color: #1e40af;
  }

  /* --- CUSTOM TOAST NOTIFICATION STYLES --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  background: #0f172a;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  border-right: 4px solid #1d4ed8;
}

.toast-message.toast-success {
  border-right-color: #10b981;
}

.toast-message.toast-error {
  border-right-color: #ef4444;
}

.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}
  
  /* ==========================================
   ACCESS DENIED MODAL (CENTERED MOBILE FIX)
   ========================================== */

/* Fullscreen Centered Flex Overlay */
.access-denied-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;     /* Vertically centers the modal */
    justify-content: center !important; /* Horizontally centers the modal */
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 99999 !important;
    padding: 16px !important;            /* Safe boundary padding for small screens */
    box-sizing: border-box !important;
  }
  
  /* Card Sizing and Centered Layout */
  .access-denied-card {
    text-align: center !important;
    width: 100% !important;
    max-width: 360px !important;        /* Keeps card compact and proportional on mobile */
    padding: 28px 20px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid #f1f5f9 !important;
    margin: auto !important;             /* Ensures perfect flex centering fallback */
  }

  /* ==========================================
   MOCKUP MATCHING LAYOUT EXTENSIONS
   ========================================== */

/* Dashed Action Buttons (+ زيادة الواجبات / ↑ رفع المواد) */
.dashed-action-btn {
  width: 100%;
  background: #ffffff;
  border: 2px dashed #1d4ed8;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #1d4ed8;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 18px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}

.dashed-action-btn:hover {
  background: #eff6ff;
  border-color: #1e40af;
  transform: translateY(-2px);
}

/* Section Blocks */
.admin-section-block {
  margin-bottom: 32px;
}

/* Blue Active Assignment Cards */
.admin-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-assignment-card {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  border-radius: 18px;
  padding: 18px 22px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: #ffffff;
}

.card-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.card-actions-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.circle-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.circle-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.circle-icon-btn:hover {
  transform: scale(1.1);
}

.days-remaining-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

/* Filter Bar & Category Chips */
.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.level-select-dropdown {
  background: #1d4ed8;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.category-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1d4ed8;
  border-radius: 8px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-chip.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* CHANGELOG BULLETIN STYLES */
.changelog-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.changelog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.changelog-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.changelog-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: #f8fafc;
  user-select: none;
}

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

.changelog-version-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  direction: ltr;
}

.changelog-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

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

.changelog-date {
  font-size: 0.8rem;
  color: #94a3b8;
}

.changelog-toggle-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.2s ease;
}

.changelog-card.open .changelog-toggle-btn {
  transform: rotate(180deg);
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

.changelog-body {
  display: none;
  padding: 16px 18px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.changelog-card.open .changelog-body {
  display: block;
}

.changelog-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
}

.changelog-delete-btn:hover {
  text-decoration: underline;
}