/* ============================================================
   School Management – Frontend Styles
   ============================================================ */
.sm-fe-wrap       { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; max-width: 1100px; margin: 0 auto; padding: 20px; }
.sm-fe-card       { background: #fff; border-radius: 10px; box-shadow: 0 2px 16px rgba(0,0,0,.08); padding: 24px; margin-bottom: 24px; }
.sm-fe-header     { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.sm-fe-header h2  { margin: 0; color: #1a4a90; font-size: 22px; }

/* Stats */
.sm-fe-stats      { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }
.sm-fe-stat       { background: linear-gradient(135deg,#2c6fce,#1a4a90); color: #fff; border-radius: 10px; padding: 18px; text-align: center; }
.sm-fe-stat.green { background: linear-gradient(135deg,#28a745,#1e7e34); }
.sm-fe-stat.red   { background: linear-gradient(135deg,#dc3545,#b21f2d); }
.sm-fe-stat.teal  { background: linear-gradient(135deg,#17a2b8,#0d6b7c); }
.sm-fe-stat .num  { font-size: 28px; font-weight: 700; }
.sm-fe-stat .lbl  { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* Nav */
.sm-fe-nav        { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.sm-fe-nav a      { padding: 8px 16px; border-radius: 6px; text-decoration: none; color: #555; border: 1px solid #dee2e6; font-size: 13px; transition: all .15s; }
.sm-fe-nav a:hover,.sm-fe-nav a.active { background: #2c6fce; color: #fff; border-color: #2c6fce; }

/* Tables */
.sm-fe-table      { width: 100%; border-collapse: collapse; font-size: 14px; }
.sm-fe-table th   { background: #f0f4ff; font-weight: 600; padding: 10px 14px; text-align: left; border-bottom: 2px solid #dee2e6; }
.sm-fe-table td   { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.sm-fe-table tr:hover td { background: #fafbff; }

/* Badges */
.sm-fe-badge      { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.sm-fe-badge-success  { background: #d4edda; color: #155724; }
.sm-fe-badge-danger   { background: #f8d7da; color: #721c24; }
.sm-fe-badge-warning  { background: #fff3cd; color: #856404; }
.sm-fe-badge-info     { background: #d1ecf1; color: #0c5460; }
.sm-fe-badge-secondary{ background: #e2e3e5; color: #383d41; }

/* Login form */
.sm-fe-login      { max-width: 440px; margin: 40px auto; }
.sm-fe-login h2   { text-align: center; color: #1a4a90; margin-bottom: 24px; }
.sm-fe-form-group { margin-bottom: 16px; }
.sm-fe-form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.sm-fe-form-group input { width: 100%; padding: 10px 14px; border: 1px solid #dee2e6; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.sm-fe-form-group input:focus { border-color: #2c6fce; outline: none; box-shadow: 0 0 0 3px rgba(44,111,206,.15); }
.sm-fe-btn        { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .15s; text-decoration: none; }
.sm-fe-btn-primary { background: #2c6fce; color: #fff; width: 100%; justify-content: center; }
.sm-fe-btn-primary:hover { background: #1a4a90; }
.sm-fe-btn-sm     { padding: 6px 12px; font-size: 12px; }
.sm-fe-btn-danger { background: #dc3545; color: #fff; }

/* Attendance calendar */
.att-calendar     { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.att-day          { aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; }
.att-day.present  { background: #d4edda; color: #155724; }
.att-day.absent   { background: #f8d7da; color: #721c24; }
.att-day.late     { background: #fff3cd; color: #856404; }
.att-day.holiday  { background: #d1ecf1; color: #0c5460; }
.att-day.empty    { background: transparent; }

/* Profile card */
.sm-fe-profile    { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sm-fe-avatar     { width: 80px; height: 80px; border-radius: 50%; background: #e8f0fe; display: flex; align-items: center; justify-content: center; font-size: 36px; flex-shrink: 0; }
.sm-fe-profile h3 { margin: 0 0 4px; color: #1a4a90; }
.sm-fe-profile p  { margin: 0; color: #666; font-size: 14px; }

/* Alert */
.sm-fe-alert      { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.sm-fe-alert-success { background: #d4edda; color: #155724; }
.sm-fe-alert-error   { background: #f8d7da; color: #721c24; }
.sm-fe-alert-info    { background: #d1ecf1; color: #0c5460; }

@media (max-width: 600px) {
    .sm-fe-stats { grid-template-columns: 1fr 1fr; }
    .sm-fe-wrap  { padding: 12px; }
}
