/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@300;400;500;600;700&family=Noto+Serif+Bengali:wght@400;600;700&display=swap');

:root {
  --primary: #1565C0;
  --primary-dark: #0D47A1;
  --primary-light: #E3F2FD;
  --secondary: #00897B;
  --accent: #F57F17;
  --danger: #C62828;
  --success: #2E7D32;
  --warning: #F9A825;
  --bg: #F0F4F8;
  --white: #FFFFFF;
  --text: #1A237E;
  --text-light: #546E7A;
  --border: #CFD8DC;
  --shadow: 0 2px 12px rgba(21,101,192,0.10);
  --radius: 10px;
  --font-bn: 'Noto Sans Bengali', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-bn);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Navbar ---- */
.main-navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-navbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover { color: white; }

.btn-back {
  background: rgba(255,255,255,0.2);
  color: white !important;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none !important;
  font-size: 13px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-back:hover { background: rgba(255,255,255,0.35); }

/* ---- Admin Layout ---- */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* ---- Sidebar ---- */
.sidebar {
  width: 235px;
  background: var(--primary-dark);
  color: white;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar-header {
  padding: 14px 16px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.18s;
  border-left: 3px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
  background: rgba(255,255,255,0.13);
  color: white;
  border-left-color: #F9A825;
}

/* ---- Content Area ---- */
.content-area {
  flex: 1;
  padding: 22px 25px;
  overflow-x: auto;
  min-width: 0;
}

/* ---- Cards ---- */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
  margin-bottom: 20px;
}

.card-header {
  background: white;
  border-bottom: 2px solid var(--primary-light);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-title { font-size: 15px; font-weight: 700; color: var(--primary-dark); margin: 0; }
.card-body { padding: 18px; }

/* ---- Stats Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid var(--primary);
}
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.danger  { border-left-color: var(--danger); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info .stat-number { font-size: 24px; font-weight: 700; line-height: 1; color: #263238; }
.stat-info .stat-label  { font-size: 12px; color: var(--text-light); margin-top: 3px; }

/* ---- Table ---- */
.table-responsive { overflow-x: auto; }

table.tl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tl-table th {
  background: var(--primary-dark);
  color: white;
  padding: 10px 12px;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}
table.tl-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #EEF2F7;
  vertical-align: middle;
}
table.tl-table tr:hover td { background: var(--primary-light); }

/* ---- Forms ---- */
.form-section {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  padding-bottom: 11px;
  border-bottom: 2px solid var(--primary-light);
  margin-bottom: 18px;
}

.form-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 8px 11px;
  font-family: var(--font-bn);
  font-size: 13.5px;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.1); }
.form-control::placeholder { color: #B0BEC5; }
select.form-control { cursor: pointer; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  font-family: var(--font-bn);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover   { background: var(--primary-dark); color: white; }
.btn-success   { background: var(--success); color: white; }
.btn-success:hover   { background: #1B5E20; color: white; }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover    { background: #B71C1C; color: white; }
.btn-warning   { background: var(--warning); color: #333; }
.btn-warning:hover   { background: #F57F17; }
.btn-secondary { background: #607D8B; color: white; }
.btn-secondary:hover { background: #455A64; color: white; }
.btn-info      { background: var(--secondary); color: white; }
.btn-info:hover      { background: #00695C; color: white; }
.btn-outline   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover   { background: var(--primary); color: white; }
.btn-sm  { padding: 5px 12px; font-size: 12.5px; }
.btn-xs  { padding: 3px 9px; font-size: 11.5px; }

/* ---- Lang Toggle ---- */
.lang-toggle { display: flex; gap: 8px; margin-bottom: 18px; }
.lang-toggle button {
  padding: 7px 18px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  font-family: var(--font-bn);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s;
  background: #E3F2FD;
  color: var(--primary);
}
.lang-toggle button.active { background: var(--primary); color: white; }

/* ---- Alerts ---- */
.alert {
  padding: 11px 16px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 13.5px;
}
.alert-success { background: #E8F5E9; color: #1B5E20; border-left: 4px solid var(--success); }
.alert-danger   { background: #FFEBEE; color: #B71C1C; border-left: 4px solid var(--danger); }
.alert-info     { background: #E3F2FD; color: #0D47A1; border-left: 4px solid var(--primary); }
.alert-warning  { background: #FFFDE7; color: #E65100; border-left: 4px solid var(--warning); }
.alert-dismissible { position: relative; padding-right: 40px; }
.btn-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; color: inherit; opacity: 0.6; }
.btn-close:hover { opacity: 1; }

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #1976D2 100%);
  padding: 20px;
}
.login-box {
  background: white;
  border-radius: 16px;
  padding: 38px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo h2 { font-size: 19px; color: var(--primary-dark); margin-top: 10px; font-weight: 700; }
.login-logo p { color: var(--text-light); font-size: 13px; }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-success   { background: #E8F5E9; color: var(--success); }
.badge-warning   { background: #FFFDE7; color: #E65100; }
.badge-danger    { background: #FFEBEE; color: var(--danger); }
.badge-info      { background: #E0F7FA; color: #006064; }
.badge-secondary { background: #ECEFF1; color: #546E7A; }
.bg-warning.text-dark { background: #FFFDE7 !important; color: #E65100 !important; }
.bg-success { background: #E8F5E9 !important; color: var(--success) !important; }
.bg-danger  { background: #FFEBEE !important; color: var(--danger) !important; }
.bg-secondary { background: #ECEFF1 !important; color: #546E7A !important; }

/* ---- Filter Bar ---- */
.filter-bar {
  background: white;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 15px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-bar .form-group { min-width: 140px; margin-bottom: 0; }

/* ---- Action Buttons ---- */
.action-btns { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---- Page Header ---- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-title  { font-size: 19px; font-weight: 700; color: var(--primary-dark); }

/* ---- Autocomplete ---- */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--primary);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.autocomplete-dropdown .ac-item { padding: 9px 14px; cursor: pointer; font-size: 13.5px; transition: background 0.15s; }
.autocomplete-dropdown .ac-item:hover { background: var(--primary-light); }

/* ---- Pagination ---- */
.pagination { display: flex; list-style: none; gap: 4px; flex-wrap: wrap; }
.pagination .page-item .page-link {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  display: block;
}
.pagination .page-item.active .page-link { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .page-item .page-link:hover { background: var(--primary-light); }

/* ---- Print ---- */
@media print { .no-print { display: none !important; } }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-group { min-width: 100%; }
  .content-area { padding: 15px; }
}
