html, body {
    height: 100%;
    margin: 0;
}

body {
    background-color: #f8f9fa;   /* restore original bg */
    color: #333;                 /* restore readable text */
    overflow: hidden;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    overflow-y: auto;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    z-index: 1000;
    transition: transform 0.3s ease; /* Added transition */
}

.sidebar.collapsed {
    transform: translateX(-240px); /* Moves sidebar out */
}

.main-header.collapsed {
    left: 0;
    width: 100%;
}

.main-content.collapsed {
    margin-left: 0;
}

/* Style for the toggle button in header */
#sidebarToggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.main-header {
    position: fixed;
    top: 0;
    left: 240px;
    height: 60px;
    width: calc(100% - 240px);
    background-color: #1f73c9;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease; /* Added transition */
}

        .header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .header-title {
            color: #ffffff;
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .table .action-icons a {
    text-decoration: none;
    margin-right: 8px;
    font-size: 1.1rem;
}

.table .action-icons a:last-child {
    margin-right: 0;
}

.table .action-icons a:hover {
    color: #1f73c9;
}

.main-content {
    position: relative;
    margin-left: 240px; /* Matched sidebar width */
    margin-top: 60px; 
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 24px;
    background-color: #f8f9fa;
    transition: all 0.3s ease; /* Added transition */
}

    .sidebar a {
      text-decoration: none;
      color: #333;
      display: block;
    }
    .sidebar a:hover {
      background: #f2f2f2;
    }

    .sidebar a.active {
    background: #143f6a;
    color: #fff;
    border-radius: 6px;
}
    .section-title {
      color: var(--primary);
      font-weight: 600;
    }
    .alert-success{
      color: green;
      font-weight: 500;
      align-self: center;
      text-decoration: none;
    }

    .alert-error{
      color: red;
      font-weight: 500;
      align-self: center;
      text-decoration: none;
            
    }

.create-button{
  color: white;
  text-decoration: none;
}

.add-religion-button {
  display: block; 
  align-items: center;
  padding: 10px 10px;
  margin-left: auto;
  
  background-color: #1976D2; /* Deep Blue color (a common Material Blue) */
  color: #FFFFFF; /* White text color */

  font-family: Arial, sans-serif; /* Common, clean font */
  font-weight: 500; /* Medium weight, common for such buttons */
  font-size: 14px; 
  text-transform: uppercase; /* Match the capitalized look */
  letter-spacing: 0.5px; /* Slight letter spacing */

  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 
              0 3px 1px -2px rgba(0, 0, 0, 0.12), 
              0 1px 5px 0 rgba(0, 0, 0, 0.20);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Optional: Hover and Active States for better UX */
.add-religion-button:hover {
  background-color: #1565C0; /* Darker blue on hover */
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 
              0 1px 10px 0 rgba(0, 0, 0, 0.12), 
              0 2px 4px -1px rgba(0, 0, 0, 0.20); /* Slightly bigger shadow */
}

.add-religion-button:active {
  background-color: #0D47A1; /* Even darker blue when clicked */
}

.add-religion-button .icon {
  margin-right: 8px; /* Space between the icon and text */
  font-size: 20px; /* Adjust icon size */
  line-height: 1; /* Ensure alignment */
}

    /* Page wrapper */
.form-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    font-family: "Segoe UI", sans-serif;
}

/* Heading */
.form-container h1 {
    color: #1a73e8;
    font-size: 26px;
    margin-bottom: 15px;
    text-align: left;
}

/* Error message box */
.error-box {
    background: #ffe5e5;
    border-left: 4px solid #ff4b4b;
    color: #b30000;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 15px;
}

/* Label styling */
.form-container label {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: block;
}

/* Input fields + textarea */
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.2s border-color ease;
    margin-bottom: 12px;
}

.form-container textarea {
    height: 140px;
    resize: vertical;
}

.form-container input:focus,
.form-container textarea:focus,
.form-container select:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 4px rgba(26, 115, 232, 0.3);
}

/* Error text for fields */
.form-container .field-error {
    color: #ff4b4b;
    font-size: 14px;
    margin-bottom: 10px;
}

/* replace your existing rule with this */
.form-container .plain-submit,
.form-container input[type="submit"].plain-submit {
    background: #1a73e8;
    color: #fff;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s background;
    width: 100%;
    margin-top: 10px;
}


.form-container button:hover,
.form-container input[type="submit"]:hover {
    background: #155bb5;
}


.messages {
  max-width: 760px;
  margin: 18px auto;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
  padding: 0 12px;
}

/* Base alert */
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(12, 30, 60, 0.06);
  transition: transform 420ms cubic-bezier(.2,.9,.3,1), opacity 420ms ease;
  transform-origin: center;
  opacity: 1;
}

/* Content wrapper */
.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;       /* allow shrinking */
    min-width: 0;         /* VERY IMPORTANT */
}

/* Icon and text */
.alert-icon { font-size: 18px; }
.alert-text { font-weight: 500; font-size: 15px; color: #0f1724; }

/* Close button */
.alert-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: #222;
  opacity: 0.8;
  transition: background .15s, opacity .15s;
}
.alert-close:hover { background: rgba(0,0,0,0.04); opacity: 1; }

/* State classes for different message types */
.alert.success { background: #e6f9ed; border-left: 5px solid #28a745; color: #1c7c39; }
.alert.error   { background: #ffeaea; border-left: 5px solid #e63946; color: #b30000; }
.alert.warning { background: #fff7e6; border-left: 5px solid #f4a300; color: #805500; }
.alert.info    { background: #e8f1ff; border-left: 5px solid #1a73e8; color: #1a4fa8; }

/* Hide animation: slide up and fade */
.alert.hiding {
  opacity: 0;
  transform: translateY(-14px) scale(0.995);
  pointer-events: none;
}

/* Avoid layout jump when removing quickly */
.alert.removing {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: height 260ms ease, margin 260ms ease, padding 260ms ease;
}

/* Modal must be above backdrop */
.modal {
    z-index: 2100 !important;
}

/* Backdrop must stay BELOW modal */
.modal-backdrop {
    z-index: 2000 !important;
}

/* Ensure modal content is interactive */
.modal-content,
.modal-body {
    pointer-events: auto;
}

#docImage {
    zoom: 1;
    transition: zoom 0.15s ease;
    user-select: none;
}


.main-header,
.student-header {
    z-index: 900;
}

/* small screens */
@media (max-width: 520px) {
  .alert { padding: 10px 10px; border-radius: 8px; }
  .alert-text { font-size: 14px; }
}

.fade-out {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

  :root { --primary: rgb(20,63,106); }
    .sidebar a {
      text-decoration: none;
      color: #333;
      display: block;
    }
    .sidebar a:hover {
      background: #f2f2f2;
    }
    .section-title {
      color: var(--primary);
      font-weight: 600;
    }
    .chevron { transition: transform .5s ease; }
    .chevron.up { transform: rotate(180deg); } /* up when visible */


    .page-title { color: #0d6efd; font-weight:700; }
    .card { box-shadow: 0 2px 8px rgba(13,63,106,0.06); 
      overflow: visible;
      border: 0; }
    .form-section { margin-top: 1.25rem; }
    .table thead th { vertical-align: middle; }
    .small-muted { font-size: .875rem; color: #6c757d; }
    .btn-add { min-width: 140px; }
    .required-label::after { content: " *"; color: #d9534f; }
    .top-gap { margin-top: 18px; }
    .checkbox-inline { margin-left: .5rem; }


    /* =========================
   GLOBAL PRIMARY COLOR
   ========================= */
:root {
    --bs-primary: #1f73c9;
    --bs-primary-rgb: 31, 115, 201;

    --bs-link-color: #1f73c9;
    --bs-link-hover-color: #185ea4;

    --bs-focus-ring-color: rgba(31, 115, 201, 0.25);
}

/* =========================
   BUTTONS
   ========================= */
.btn-primary {
    --bs-btn-bg: #1f73c9;
    --bs-btn-border-color: #1f73c9;
    --bs-btn-hover-bg: #185ea4;
    --bs-btn-hover-border-color: #185ea4;
    --bs-btn-active-bg: #144f8a;
    --bs-btn-active-border-color: #144f8a;
    --bs-btn-focus-shadow-rgb: 31, 115, 201;
}

.btn-outline-primary {
    --bs-btn-color: #1f73c9;
    --bs-btn-border-color: #1f73c9;
    --bs-btn-hover-bg: #1f73c9;
    --bs-btn-hover-border-color: #1f73c9;
    --bs-btn-hover-color: #fff;
    --bs-btn-focus-shadow-rgb: 31, 115, 201;
}

/* =========================
   TEXT & BACKGROUNDS
   ========================= */
.text-primary {
    color: #1f73c9 !important;
}

.bg-primary {
    background-color: #1f73c9 !important;
}

/* =========================
   FORMS & INPUTS
   ========================= */
.form-control:focus,
.form-select:focus {
    border-color: #1f73c9;
    box-shadow: 0 0 0 0.25rem rgba(31, 115, 201, 0.25);
}

/* =========================
   LINKS
   ========================= */
a {
    color: #1f73c9;
}
a:hover {
    color: #185ea4;
}

/* =========================
   NAV / HEADER / ACTIVE STATES
   ========================= */
.nav-link.active,
.nav-pills .nav-link.active,
.page-link.active {
    background-color: #1f73c9;
    border-color: #1f73c9;
}

.page-link {
    color: #1f73c9;
}
.page-link:hover {
    color: #185ea4;
}

/* =========================
   CHECKBOX / RADIO
   ========================= */
.form-check-input:checked {
    background-color: #1f73c9;
    border-color: #1f73c9;
}

/* =========================
   PROGRESS / BADGE
   ========================= */
.progress-bar,
.badge.bg-primary {
    background-color: #1f73c9;
}

/* 1. Hide the "Loading" message permanently */
.fixed-table-loading {
    display: none !important;
}

.bootstrap-table .fixed-table-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

.bootstrap-table .fixed-table-toolbar .export .btn {
    background-color: #1976D2;
    color: #fff;
    border-radius: 4px;
}
