/* ========== BASE & THEME COLORS ========== */
:root {
  --bg-main: #fff;
  --bg-alt: #f6f6f6;
  --fg-main: #58585c;
  --color-flip: #444; /* Use dark mode bg for light mode elements */
  --color-flip-bg: #fff; /* Use light mode bg for dark mode elements */
  --border-main: #e6e8ec;
  --link-main: #007BFF;
  --box-header: #23292F;
  --shadow: none;
  --bt-bg: #3a3a3a;
  --bt-color: #fff;
  --bt-bg-hover: #fff;
  --bt-color-hover: #3a3a3a;
  --input-placeholder: #888;
  --input-bg: transparent;
}
[data-theme="dark"] {
  --bg-main: #444;
  --bg-alt: #333;
  --fg-main: #fff;
  --color-flip: #fff;
  --color-flip-bg: #444;
  --border-main: #555;
  --link-main: #6baaff;
  --box-header: #23292F;
  --shadow: none;
  --bt-bg: #fff;
  --bt-color: #3a3a3a;
  --bt-bg-hover: #3a3a3a;
  --bt-color-hover: #3a3a3a;
  --input-placeholder: #bbb;
  --input-bg: transparent;
}

/* ========== FONTS ========== */
@font-face {
  font-family: 'Manrope';
  src: url('../../fonts/Manrope-Regular.woff2') format('woff2'),
       url('../../fonts/Manrope-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../../fonts/Manrope-Bold.woff2') format('woff2'),
       url('../../fonts/Manrope-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========== TITLES ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Open Sans", 'Manrope', 'Inter', 'Segoe UI', Arial, sans-serif !important;
  color: var(--fg-main);
  font-weight: 700;
  margin: 0.5em 0;
}

/* ========== BASE ELEMENTS ========== */
html, body {
  background: var(--bg-main);
  color: var(--fg-main);
  font-family: 'Open Sans','Manrope', 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.1;
  margin: 0;
  padding: 0;
  transition: background 0.18s, color 0.18s;
}
*, *::before, *::after { box-sizing: border-box; }

/* ========== BOX/PANEL ========== */
.box {
  border-radius: 10px;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow);
  margin-bottom: 4rem;
  overflow: hidden;
  padding: 0;
  background: transparent;
}
.flat-bg, .box, .table, .form-card, .form-group, .input, .select, .textarea {
  background: transparent !important;
}

/* ========== BOX HEADER ========== */
.box .box-header {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-bottom: 1px solid var(--border-main) !important;
  border-radius: 10px 10px 0 0 !important;
  padding-left: 1.2em !important;
  padding-right: 1.2em !important;
  min-height: 48px !important;
  position: relative !important;
}
.box .box-header .box-title {
  color: var(--fg-main) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  margin: 0 !important;
  text-align: left !important;
  display: block !important;
  padding: 0 !important;
  background: none !important;
  font-family: "Open Sans", 'Manrope', Arial, sans-serif !important;
}
.box .box-header .breadcrumb {
  margin-left: auto !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 0.96em !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5em !important;
  align-items: center !important;
  color: #888 !important;
}
.box .box-header .breadcrumb li {
  list-style: none !important;
  display: inline !important;
  color: inherit !important;
}
.box .box-header .breadcrumb .active {
  color: var(--fg-main) !important;
  font-weight: 500 !important;
}
.box .box-header a {
  color: var(--link-main) !important;
}

/* ========== PAGE HEADER ========== */
.page-header {
  margin: 10px 0 20px 0;
  padding-bottom: 10px;
  color: var(--bt-color);
}
.page-header a {
  font-size: 14px;
  border-bottom: none;
 
}

/* ========== TABLES ========== */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  background: transparent;
}
.table th,
.table td {
  padding: 0.95em 1.2em;
  text-align: left;
  font-size: 1em;
  border-bottom: 1px solid var(--border-main);
  color: var(--fg-main);
  background: transparent;
  vertical-align: middle;
  transition: background 0.18s;
}
.table th {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 2px solid var(--border-main);
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background: var(--bg-alt);
}
.table tbody tr:nth-child(odd),
.table tbody tr:nth-child(even) {
  background: transparent;
}

/* ========== FORM CARDS & INPUTS ========== */
.form-card {
  background: transparent;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 2rem 2.5rem;
  max-width: 600px;
  margin: 2rem auto;
  border: 1px solid var(--border-main);
}
.form-card h2,
.form-card legend {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--link-main);
  margin-bottom: 1.7em;
  letter-spacing: 0.01em;
  border: none;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2%;
}
.form-group {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.form-group.full {
  flex: 1 1 100%;
}
.form-label {
  margin-bottom: 0.4em;
  font-weight: 500;
  color: var(--fg-main);
}

/* ====== CLEAN INPUTS: BORDER BOTTOM ONLY ====== */
.input, 
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="search"], 
select, 
textarea,
.select,
.textarea {
  font-size: 1em;
  padding: 0.7em 0.5em 0.5em 0.5em;
  border: none;
  border-bottom: 2px solid var(--border-main);
  border-radius: 0;
  box-shadow: none;
  background: var(--bg-main);
  color: var(--fg-main);
  outline: none;
  transition: border-bottom-color 0.2s, background 0.18s;
  margin-bottom: 0.2em;
}
.input:focus, 
input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
input[type="number"]:focus, 
input[type="search"]:focus, 
select:focus, 
textarea:focus,
.select:focus,
.textarea:focus {
  border-bottom: 2px solid var(--link-main);
  background: var(--input-bg);
  outline: none;
}
.input::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder,
.textarea::placeholder {
  color: var(--input-placeholder, #888);
  opacity: 1;
}

/* ========== BUTTONS ========== */
.btn, .btn-link {
  display: inline-block;
  font-weight: 500;
  color: var(--bt-color) !important;
  text-align: center;
  vertical-align: middle;
  background: var(--bt-bg) !important;
  border: none;
  border-bottom: none;
  border-radius: 33px;
  padding: .44em 1.15em;
  font-size: 1em;
  line-height: 1.45;
  cursor: pointer;
  transition: color .18s, background-color .18s, border-color .18s;
  box-shadow: none;
  outline: none;
}
.btn:hover, .btn:focus,
.btn-link:hover, .btn-link:focus {
  background: var(--bt-bg-hover) !important;
  color: var(--bt-color-hover) !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.btn:active, .btn-link:active {
  background: var(--bt-bg-hover) !important;
  color: var(--bt-color-hover) !important;
}

.btn-transparent {
  background: transparent !important;
  color: var(--bt-color);
  box-shadow: none;
}

.btn-transparent:hover,
.btn-transparent:focus {
  background: transparent;
  color: var(--bt-color-hover);
  box-shadow: none;
}

/* ========== UTILITIES ========== */
.text-link { color: var(--link-main); }
.text-main { color: var(--fg-main); }
.bg-main   { background: var(--bg-main); }
.bg-alt    { background: var(--bg-alt); }
.border-main { border-color: var(--border-main); }
.rounded      { border-radius: 33px; }
.shadow       { box-shadow: var(--shadow); }

::-webkit-input-placeholder { color: var(--input-placeholder, #888); }
::-moz-placeholder { color: var(--input-placeholder, #888); }
:-ms-input-placeholder { color: var(--input-placeholder, #888); }
::placeholder { color: var(--input-placeholder, #888); }


/* ========== TOPBAR THEME VARIABLES ========== */
:root {
  --topbar-bg: #fff;
  --topbar-color: #23292F;
  --topbar-icon: #444;
  --topbar-icon-hover: #007BFF;
  --topbar-border: #e6e8ec;
  --topbar-badge-bg: #444;
  --topbar-badge-color: #fff;
  --user-avatar-border: #d6d9e1;
  --user-dropdown-bg: #fff;
  --user-dropdown-color: #23292F;
  --user-dropdown-border: #e0e0e0;
  --color-flip: #444;
  --color-flip-bg: #fff;
}

[data-theme="dark"] {
  --topbar-bg: #1A1C1E;
  --topbar-color: #fff;
  --topbar-icon: #fff;
  --topbar-icon-hover: #6baaff;
  --topbar-border: #1A1C1E;
  --topbar-badge-bg: #fff;
  --topbar-badge-color: #444;
  --user-avatar-border: #3a3d45;
  --user-dropdown-bg: #1e1e1e;
  --user-dropdown-color: #eee;
  --user-dropdown-border: #333;
  --color-flip: #fff;
  --color-flip-bg: #444;
}

/* ========== TOPBAR CONTAINER ========== */
.aiz-topbar {
  background: var(--topbar-bg);
  color: var(--topbar-color);
  border-bottom: 1px solid var(--topbar-border);
  min-height: 58px;
  display: flex;
  align-items: center;
  z-index: 100;
  padding-left: 15px;
  padding-right: 15px;
}

/* ========== LOGO & SCHOOL NAME ========== */
.site-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 10px;
  vertical-align: middle;
}
.site-name {
  font-weight: 600;
  margin: 0;
  color: var(--topbar-color);
  line-height: 1.2;
}

/* ========== TOPBAR BUTTONS & ICONS ========== */
.aiz-topbar .btn-topbar,
.aiz-topbar .btn-icon,
.aiz-topbar .btn-calendar,
.aiz-topbar .bell-icon,
.aiz-topbar .dropdown-toggle {
  background: transparent !important;
  border: none;
  border-radius: 999px !important;
  color: var(--topbar-icon) !important;
  fill: var(--topbar-icon) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  padding: 0.44em 0.55em;
  font-size: 1.5rem;
}

.aiz-topbar .btn-topbar .icon,
.aiz-topbar .btn-icon .icon,
.aiz-topbar .bell-icon .icon,
.aiz-topbar .btn-calendar .icon {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
  color: var(--topbar-icon) !important;
  fill: var(--topbar-icon) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.aiz-topbar .btn-topbar:hover,
.aiz-topbar .btn-icon:hover,
.aiz-topbar .btn-calendar:hover,
.aiz-topbar .bell-icon:hover,
.aiz-topbar .dropdown-toggle:hover {
  background: var(--color-flip) !important;
  color: var(--color-flip-bg) !important;
  fill: var(--color-flip-bg) !important;
}
.aiz-topbar .btn-topbar:hover .icon,
.aiz-topbar .btn-icon:hover .icon,
.aiz-topbar .btn-calendar:hover .icon,
.aiz-topbar .bell-icon:hover .icon {
  color: var(--color-flip-bg) !important;
  fill: var(--color-flip-bg) !important;
}

.aiz-topbar-nav-toggler .btn-topbar,
.aiz-topbar-nav-toggler .btn-topbar:hover,
.aiz-topbar-nav-toggler .btn-topbar:focus {
  background: transparent !important;
  color: var(--topbar-icon) !important;
  fill: var(--topbar-icon) !important;
}

/* ========== TOPBAR BADGE (TOPBAR ONLY) ========== */
.aiz-topbar .topbar-badge {
  background: var(--topbar-badge-bg);
  color: var(--topbar-badge-color);
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.16em 0.5em;
  position: absolute;
  top: 0.25em;
  right: 0.2em;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  z-index: 1;
}

/* ========== USER AVATAR ========== */
.user-avatar-top {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--user-avatar-border);
  background: var(--color-flip) !important;
  color: var(--color-flip-bg) !important;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== USER DROPDOWN ========== */
.modern-user-dropdown {
  background: var(--user-dropdown-bg);
  color: var(--user-dropdown-color);
  border-radius: 10px;
  border: 1px solid var(--user-dropdown-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 250px;
  padding: 1rem;
}
[data-theme="dark"] .modern-user-dropdown {
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.modern-user-dropdown a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 0.5em 0;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.modern-user-dropdown a:hover {
  background: rgba(28,119,255,0.08);
  color: var(--topbar-icon-hover);
}


/* ========== END TOPBAR STYLES ========== */



/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
  .form-card { padding: 1.4rem 1rem; }
  .form-row { flex-direction: column; gap: 0.8rem; }
  .form-group { flex: 1 1 100%; }
  .box .box-header { padding-left: 1rem !important; padding-right: 1rem !important; }
}
@media (max-width: 700px) {
  .box .box-header { flex-direction: column; align-items: flex-start; min-height: unset !important; }
  .table th, .table td { padding: 0.7em 0.4em; font-size: 0.95em; }
  .form-card { max-width: 98vw; }
  .box .box-header .breadcrumb { margin-left: 0 !important; margin-top: 0.5em !important; }
}

/* ========== RESPONSIV TOPBARE ========== */
@media (max-width: 960px) {
  .site-logo { width: 25px; height: 25px; margin-right: 5px; }
  .site-name { font-size: 1rem; }
  .user-avatar-top { width: 28px; height: 28px; }
  .aiz-topbar .btn-topbar,
  .aiz-topbar .btn-icon,
  .aiz-topbar .btn-calendar,
  .aiz-topbar .bell-icon,
  .aiz-topbar .dropdown-toggle {
    font-size: 1.2rem;
    padding: 0.25em 0.4em;
  }
  .aiz-topbar .icon {
    width: 1.2rem;
    height: 1.2rem;
    font-size: 1.2rem;
  }
  .modern-user-dropdown { width: 200px; padding: 0.5rem; }
}
@media (max-width: 480px) {
  .aiz-topbar { padding-left: 5px !important; padding-right: 5px !important; }
  .site-logo { width: 22px; height: 22px; }
  .site-name { font-size: 0.85rem; }
  .user-avatar-top { width: 22px; height: 22px; }
  .aiz-topbar .icon { width: 1rem; height: 1rem; font-size: 1rem; }
  .modern-user-dropdown { width: 140px; padding: 0.25rem; }
}
