/* Raj Educational Group ERP Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

/* Login Page */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #e0e7ff 0%, #d1d5ff 50%, #ede9fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  overflow: hidden;
}

.login-header {
  text-align: center;
  padding: 32px 32px 16px;
}

.login-logo {
  width: 70px;
  height: 70px;
  background: #2563eb;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.login-logo img { width: 40px; height: 40px; object-fit: contain; }

.login-header h1 { font-size: 22px; font-weight: 700; color: #111827; }
.login-header p { color: #6b7280; margin-top: 4px; font-size: 14px; }

.login-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin: 0 32px;
}

.login-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.login-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.login-form { padding: 24px 32px 32px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  width: 100%;
  padding: 12px;
}

.btn-primary:hover { background: #1d4ed8; }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

.error-msg {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.success-msg {
  background: #ecfdf5;
  color: #059669;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Layout */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img { width: 48px; height: 48px; object-fit: contain; }

.sidebar-brand div { min-width: 0; }

.sidebar-brand h3 {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand p { font-size: 11px; color: #6b7280; }

.sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: #eff6ff;
  color: #2563eb;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
}

.sidebar-user {
  background: #f9fafb;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.sidebar-user p:first-child { font-size: 11px; color: #6b7280; }
.sidebar-user p:last-child { font-size: 13px; font-weight: 600; color: #111827; }

/* Main Content */
.main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h2 { font-size: 16px; font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.content { flex: 1; padding: 32px; overflow-y: auto; }

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #f3f4f6;
}

.card-header { padding: 20px 24px; border-bottom: 1px solid #f3f4f6; }
.card-header h3 { font-size: 16px; font-weight: 600; }
.card-body { padding: 24px; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card div:first-child p { font-size: 13px; color: #6b7280; }
.stat-card div:first-child h2 { font-size: 32px; font-weight: 700; margin-top: 4px; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody td {
  padding: 14px 16px;
  border-top: 1px solid #f3f4f6;
}

tbody tr:hover { background: #f9fafb; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-green { background: #ecfdf5; color: #059669; }

/* Search & Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-bar input, .filter-bar select {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.filter-bar input { flex: 1; min-width: 200px; }

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
  margin-top: 32px;
}

/* Photo Upload */
.photo-box {
  width: 140px;
  height: 170px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  cursor: pointer;
  overflow: hidden;
}

.photo-box img { width: 100%; height: 100%; object-fit: cover; }

/* Progress bars */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body { padding: 24px; }

/* PDF Preview */
.pdf-preview {
  background: #f9fafb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 0; overflow: hidden; }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
}

/* Hindi text rendering */
.hindi-text {
  font-family: 'Noto Sans Devanagari', 'Mangal', 'Arial', sans-serif;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state h3 { color: #6b7280; margin-bottom: 8px; }

/* Action buttons group */
.actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Print styles */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
}
