/* 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: 18px;
  font-weight: 700;
}

.main-navbar .brand svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.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;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-back:hover { background: rgba(255,255,255,0.35); color: white; }

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

.sidebar {
  width: 240px;
  background: var(--primary-dark);
  color: white;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar .sidebar-header {
  padding: 20px 15px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
}

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

.sidebar a:hover, .sidebar a.active {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: var(--accent);
}

.sidebar a svg { width: 18px; height: 18px; fill: currentColor; }

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

/* ---- 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: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius) var(--radius) 0 0;
}

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

.card-body { padding: 20px; }

/* ---- Stats Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 4px solid var(--primary);
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger  { border-left-color: var(--danger); }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
}

.stat-icon svg { width: 24px; height: 24px; fill: var(--primary); }
.stat-card.success .stat-icon { background: #E8F5E9; }
.stat-card.success .stat-icon svg { fill: var(--success); }
.stat-card.warning .stat-icon { background: #FFFDE7; }
.stat-card.warning .stat-icon svg { fill: var(--warning); }
.stat-card.danger .stat-icon { background: #FFEBEE; }
.stat-card.danger .stat-icon svg { fill: var(--danger); }

.stat-info .stat-number {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.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;
}

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: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

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

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 180px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-group label .req { color: var(--danger); margin-left: 3px; }

.form-control {
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 9px 12px;
  font-family: var(--font-bn);
  font-size: 14px;
  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 18px;
  border-radius: 7px;
  font-family: var(--font-bn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; fill: currentColor; }

.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: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* ---- Language toggle ---- */
.lang-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.lang-toggle button {
  padding: 7px 18px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  font-family: var(--font-bn);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  background: #E3F2FD;
  color: var(--primary);
}

.lang-toggle button.active {
  background: var(--primary);
  color: white;
}

/* ---- Alert ---- */
.alert {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.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); }

/* ---- 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: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo img { width: 70px; height: 70px; }
.login-logo h2 { font-size: 20px; 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: 600;
}
.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; }

/* ---- Modal ---- */
.modal-header { background: var(--primary); color: white; }
.modal-title { color: white; font-weight: 700; }
.btn-close-white { filter: invert(1); }

/* ---- Search & Filter ---- */
.filter-bar {
  background: white;
  padding: 15px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-bar .form-group { min-width: 150px; margin-bottom: 0; }

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

/* ---- Page header ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

/* ---- Autocomplete dropdown ---- */
.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: 250px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.autocomplete-dropdown .ac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
.autocomplete-dropdown .ac-item:hover { background: var(--primary-light); }
.form-group.relative { position: relative; }

/* ---- Print/PDF hidden ---- */
@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%; }
}
