:root {
    --primary-blue: rgb(26, 111, 238);
    --secondary-blue: rgb(50, 100, 225);
    --dark-blue: rgb(5, 50, 117);
  
    /* neutrals */
    --light-gray: #f7f7f7;
  
    /* admin theme */
    --ac-bg: #f7f8fb;
    --ac-card: #ffffff;
    --ac-border: #e5e7eb;
    --ac-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.06);
    --ac-text: #111827;
    --ac-muted: #6b7280;
  
    /* accents */
    --ac-primary: #2563eb;
    --ac-primary-600: #1d4ed8;
    --ac-green: #16a34a;
    --ac-red: #dc2626;
  }
  
  /* Generic & Elements */
  input[type="date"] {
    -webkit-appearance: auto;
    appearance: auto;
  }

  
  /*  Minimal Form Card  */
  .mf-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.06);
    padding: 16px;
    margin: 12px 0;
  }
  .mf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .mf-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
  }
  .mf-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
  }
  .mf-iconbtn:hover {
    background: #f3f4f6;
    color: #374151;
  }
  .mf-body {
    display: grid;
    gap: 12px;
  }
  .mf-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
  }
  .mf-col {
    grid-column: span 12;
  }
  @media (min-width: 768px) {
    .mf-col {
      grid-column: span 6;
    }
  }
  .mf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
  }
  .mf-btn-primary {
    border-radius: 10px;
    font-weight: 600;
  }
  .mf-btn-secondary {
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
  }
  .mf-btn-secondary:hover {
    background: #f3f4f6;
  }
  .mf-date-input::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0;
    pointer-events: none;
  }
  .mf-cal-append {
    cursor: pointer;
    background: #fff;                 
    border-left: 1px solid var(--ac-border);
    color: var(--ac-primary);
  }
  .mf-cal-append:hover { background: #f3f4f6; }
  .mf-cal-append svg { width: 18px; height: 18px; }


  
  /*  Admin  */
  /* layout */
  .ac-root {
    background: var(--ac-bg);
    min-height: 100%;
    padding: 24px;
    box-sizing: border-box;
    color: var(--ac-text);
    font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji";
  }
  .ac-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
  }
  
  /* top bar */
  .ac-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--ac-bg);
    padding-bottom: 8px;
  }
  .ac-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  /* search */
  .ac-search {
    position: relative;
    min-width: 280px;
    flex: 1 1 320px;
  }
  .ac-search input {
    width: 100%;
    border: 1px solid var(--ac-border);
    background: #fff;
    padding: 10px 12px 10px 36px;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
  }
  .ac-search input:focus {
    border-color: var(--ac-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  }
  .ac-search__icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ac-muted);
  }
  
  /* buttons */
  .ac-btn {
    --pad-x: 14px;
    --pad-y: 9px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--ac-border);
    background: #fff;
    color: #374151;
    padding: var(--pad-y) var(--pad-x);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
  }
  .ac-btn:hover {
    background: #f3f4f6;
  }
  .ac-btn:active {
    transform: translateY(0.5px);
  }
  .ac-btn--primary {
    background: var(--ac-primary);
    border-color: var(--ac-primary);
    color: #fff;
  }
  .ac-btn--primary:hover {
    background: var(--ac-primary-600);
  }
  .ac-btn--success {
    background: var(--ac-green);
    border-color: var(--ac-green);
    color: #fff;
  }
  .ac-btn--success:hover {
    filter: brightness(.92);
  }
  .ac-btn--neutral {
    background: #f9fafb;
    color: #374151;
  }
  .ac-btn--danger {
    color: var(--ac-red);
  }
  .ac-btn--text {
    background: transparent;
    border-color: transparent;
  }
  .ac-btn--sm {
    --pad-x: 10px;
    --pad-y: 6px;
    font-size: 13px;
    border-radius: 8px;
  }
  
  /* icon button */
  .ac-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ac-border);
    background: #fff;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    transition: all .18s ease;
  }
  .ac-iconbtn:hover {
    background: #f3f4f6;
    color: #374151;
  }
  .ac-iconbtn.is-active {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    color: var(--ac-primary);
  }
  
  /* tiny toggle */
  .ac-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  /* cards container */
  .ac-cards {
    margin-top: 16px;
    display: grid;
    gap: 18px;
  }
  .ac-cards--grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  @media (max-width: 980px) {
    .ac-cards--grid {
      grid-template-columns: 1fr;
    }
  }
  
  /* card */
  .ac-card {
    background: var(--ac-card);
    border: 1px solid var(--ac-border);
    border-radius: 14px;
    box-shadow: var(--ac-shadow);
    overflow: hidden;
  }
  .ac-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
  }
  .ac-card__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
  }
  .ac-card__center {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 18px;
    align-items: center;
    padding: 0 12px;
    min-width: 420px;
  }
  @media (max-width: 900px) {
    .ac-card__center {
      grid-auto-flow: row;
      grid-auto-columns: auto;
      gap: 8px;
      padding: 12px 0;
    }
  }
  .ac-card__right {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ac-card__title {
    font-size: 18px;
    font-weight: 700;
  }
  .ac-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e40af;
    background: #e0ecff;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
  }
  .ac-icon-badge--blue {
    color: #1e40af;
    background: #e0ecff;
  }
  
  /* meta */
  .ac-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px;
  }
  .ac-meta__icon {
    color: #6b7280;
  }
  
  /* expand */
  .ac-chevron {
    transition: transform .18s ease;
  }
  .ac-chevron.is-open {
    transform: rotate(180deg);
  }
  .ac-card__expand {
    border-top: 1px solid var(--ac-border);
    background: #fafafa;
    padding: 16px;
  }
  
  /* columns in expand */
  .ac-columns {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
  }
  @media (max-width: 900px) {
    .ac-columns {
      grid-template-columns: 1fr;
    }
  }
  .ac-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .ac-col__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #111827;
  }
  .ac-col__titleicon {
    width: 18px;
    height: 18px;
  }
  .ac-col__titleicon--blue {
    color: var(--ac-primary);
  }
  .ac-col__titleicon--green {
    color: var(--ac-green);
  }
  
  /* lists inside expand */
  .ac-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow: auto;
  }
  .ac-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--ac-border);
    background: #fff;
    border-radius: 10px;
  }
  .ac-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg,#60a5fa,#2563eb);
    color: #fff;
    font-weight: 700;
  }
  .ac-avatar--green {
    background: linear-gradient(180deg,#34d399,#059669);
  }
  .ac-list__info {
    flex: 1 1 auto;
    min-width: 0;
  }
  .ac-list__title {
    font-weight: 600;
  }
  .ac-list__sub {
    color: var(--ac-muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ac-empty {
    color: var(--ac-muted);
    font-style: italic;
    padding: 6px 2px;
  }
  
  /* card footer */
  .ac-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--ac-border);
  }
  
  /* summary widget */
  .ac-summary {
    margin-top: 16px;
    background: #fff;
    border: 1px solid var(--ac-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--ac-shadow);
  }
  .ac-summary__label {
    color: var(--ac-muted);
  }
  .ac-summary__right {
    margin-left: auto;
    color: var(--ac-muted);
  }
  
  /* Modal Layers & CSV Import Modal */
  .modal {
    z-index: 5001 !important;
  }
  .modal-backdrop {
    z-index: 5000 !important;
  }
  .csv-import-modal .modal-dialog {
    max-width: 1200px;
    width: 92vw;
  }
  .csv-import-modal .modal-content {
    border-radius: 12px;
  }
  .csv-import-modal .modal-body {
    max-height: calc(100vh - 224px);
    overflow: auto;
  }
  @media (max-width: 992px) {
    .csv-import-modal .modal-dialog {
      width: 96vw;
      margin: 12px auto;
    }
    .csv-import-modal .modal-body {
      max-height: calc(100vh - 176px);
    }
  }
  
  /* Profile (cards in Users tab) */
  .profileDetailsHeading {
    font-size: 16px;
    text-align: center;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1.2px;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 8px;
    text-shadow: 2px 2px 8px rgba(0,0,0,.3);
    box-shadow: 0 4px 6px rgba(0,0,0,.4);
    margin-bottom: 10px;
  }
  .profileInfo {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    margin-bottom: 15px;
  }
  .profileImage {
    width: 110px;
    height: 110px;
    background-image: url("../images/profile-image.jpg");
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin-left: 10px;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 8px 16px rgba(0,0,0,.2);
    transition: transform .3s ease;
  }
  .profileImage:hover {
    transform: scale(1.05);
  }
  .profileName {
    font-size: 20px;
    font-weight: bold;
    color: var(--dark-blue);
    margin: 0;
  }
  .profileEmail {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
  }
  
  /* profile buttons  */
  .dropButton {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    background-color: var(--secondary-blue);
    transition: background-color .3s, transform .3s;
  }
  .dropButton:hover {
    transform: translateY(-2px);
  }
  .dropButton:hover {
    background-color: #e43a3a;
  }
  
  .addButton {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    background-color: var(--secondary-blue);
    transition: background-color .3s, transform .3s;
  }
  .addButton:hover {
    transform: translateY(-2px);
  }
  .addButton:hover {
    background-color: #45a049;
  }
  
  .editButton {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    background-color: var(--secondary-blue);
    transition: background-color .3s, transform .3s;
    margin-left: auto;
    margin-bottom: 10px;
  }
  .editButton:hover {
    transform: translateY(-2px);
  }
  .editButton:hover {
    color: var(--secondary-blue);
    background-color: #fff;
    border: 1px solid var(--secondary-blue);
  }
  
  /* Dashboard & Forms */
  .course-form {
    width: 600px;
    height: auto;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(210,225,250,.2) 5%, rgba(50,100,225,.2) 100%);
    border: 1px solid rgb(50, 100, 225);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 3px 5px 15px rgba(0,0,0,.7);
  }
  .student-form {
    width: 600px;
    height: auto;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(210,225,250,.2) 5%, rgba(50,100,225,.2) 100%);
    border: 1px solid rgb(50, 100, 225);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 3px 5px 15px rgba(0,0,0,.7);
  }
  .instructor-form {
    width: 600px;
    height: auto;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(210,225,250,.2) 5%, rgba(50,100,225,.2) 100%);
    border: 1px solid rgb(50, 100, 225);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 3px 5px 15px rgba(0,0,0,.7);
  }
  .admin-form {
    width: 600px;
    height: auto;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, rgba(210,225,250,.2) 5%, rgba(50,100,225,.2) 100%);
    border: 1px solid rgb(50, 100, 225);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 3px 5px 15px rgba(0,0,0,.7);
  }
  .assignment-form-heading {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-blue);
    text-align: center;
  }
  
  .form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
  }
  .form-buttons button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .3s, transform .3s;
  }
  .form-buttons button:hover {
    transform: translateY(-2px);
  }
  .form-buttons .btn-secondary {
    background-color: #999;
    color: #fff;
  }
  .form-buttons .btn-primary {
    background-color: var(--primary-blue);
    color: #fff;
  }
  
  /* Cards (course/user) & Nav Tabs */
  .card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
  }
  
  .course-card .card-body {
    padding: 15px;
  }
  .user-card .card-body {
    padding: 15px;
  }
  
  .course-card .card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-blue);
  }
  .user-card .card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-blue);
  }
  
  .course-card .card-text {
    font-size: 14px;
    color: #555;
  }
  .user-card .card-text {
    font-size: 14px;
    color: #555;
  }
  
  .nav-tabs .nav-link.active {
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 8px 8px 0 0;
  }
  .nav-tabs .nav-link {
    color: var(--dark-blue);
    border: none;
    transition: background-color .3s;
  }
  .nav-tabs .nav-link:hover {
    background-color: rgba(26, 111, 238, .1);
  }
  
  /* Right Sidebar (enroll&assign) */
  .dashboard-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    height: 100vh;
    background: linear-gradient(135deg,#ffffff,#f8f8f8);
    box-shadow: -4px 0 12px rgba(0,0,0,.1);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    transition: transform .3s ease-in-out;
  }
  .dashboard-sidebar.hidden {
    transform: translateX(100%);
  }
  .dashboard-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 4px;
  }
  .dashboard-sidebar-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
  }
  .dashboard-sidebar-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
  }
  .dashboard-sidebar-close-btn:hover {
    color: #666;
  }
  .dashboard-sidebar-content {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
  }
  .dashboard-sidebar-footer {
    margin-top: 20px;
    text-align: right;
  }
  .dashboard-sidebar-footer button + button {
    margin-left: 10px;
  }
  
  /* Tables & Details (Courses tab)*/
  .dashboard-courses-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0, .1);
  }
  .dashboard-courses-table th {
    padding: 12px 15px;
    border: 1px solid #ddd;
  }
  .dashboard-courses-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
  }
  .dashboard-courses-table thead {
    background: #f4f4f4;
  }
  .dashboard-courses-table tbody tr:hover {
    background: #fafafa;
  }
  
  .dashboard-course-details {
    background: #f7f7f7;
    border-top: 1px solid #ccc;
    padding: 15px;
    border-radius: 0 0 8px 8px;
  }
  .dashboard-profile-details-heading {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
  }
  .dashboard-profile-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  .dashboard-profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
  }
  .dashboard-profile-text {
    margin-left: 10px;
    flex-grow: 1;
  }
  .dashboard-profile-name {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    color: #333;
  }
  .dashboard-profile-email {
    font-size: 12px;
    margin: 0;
    color: #777;
  }
  
  /* MISC */
  .tooltip.show {
    z-index: 12000;
  }
  .alert {
    border-radius: 5px;
    font-size: 14px;
    padding: 10px;
  }
  form input:focus,
  form select:focus,
  form textarea:focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
  }
  