/* ================= ROOT ================= */
:root{
  --accent:#317efb;
  --accent-2:#1b9a59;
  --accent-3:#f97316;
  --bg:#f4f6f9;
  --card:#ffffff;
  --radius:14px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
}

/* ================= RESET ================= */
*{
  box-sizing:border-box;
}

html, body{
  margin:0;
  padding:0;
  width:100%;
  overflow-x:hidden;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  background:var(--bg);
}

.hidden{ display:none !important; }

/* ================= DASHBOARD ================= */
.dashboard{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  padding:14px 12px;
  background:#fff;
  border-bottom:1px solid #e5e7eb;
  position:sticky;
  top:0;
  z-index:1000;
}

.dashboard .card{
  background:var(--card);
  padding:14px 10px;
  border-radius:16px;
  min-width:150px;
  text-align:center;
  box-shadow:var(--shadow);
  transition:.25s ease;
}

.dashboard .card:hover{
  transform:translateY(-2px);
}

.dashboard .card{
  font-size:12px;
  font-weight:600;
  letter-spacing:.3px;
  color:#64748b;
}

.dashboard .card span{
  display:block;
  margin-top:6px;
  font-size:22px;
  font-weight:800;
  color:#0f172a;
}

/* Dashboard color coding */
.dashboard .total-missed span{ color:#2563eb; }
.dashboard .card:nth-child(2) span{ color:#16a34a; }
.dashboard .card:nth-child(3) span{ color:#f97316; }
.dashboard .card:nth-child(4) span{ color:#7c3aed; }

/* ================= HEADER ================= */
header{
  text-align:center;
  padding:26px 14px 30px;
  background:linear-gradient(135deg,#317efb,#1b9a59);
  color:#fff;
}

header h1{
  margin:0;
  font-size:28px;
  font-weight:900;
  background:linear-gradient(90deg,#fff,#e0f2fe,#bbf7d0);
  background-size:300% 300%;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:titleGradient 6s ease infinite;
}

header .subtitle{
  margin-top:6px;
  font-size:14px;
  font-weight:600;
  opacity:.95;
}

/* ================= LOGO ================= */
.app-logo{
  width:88px;
  height:88px;
  object-fit:contain;
  margin-bottom:6px;
  animation:logoPulse 3s ease-in-out infinite;
}

/* ================= CONTAINER ================= */
.container{
  max-width:880px;
  margin:20px auto;
  background:var(--card);
  padding:20px;
  border-radius:18px;
  box-shadow:var(--shadow);
}

/* ================= CONTROLS ================= */
.controls{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.controls button{
  flex:1;
  background:linear-gradient(135deg,var(--accent),#245bda);
  color:#fff;
  border:none;
  padding:14px 18px;
  border-radius:14px;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  min-height:50px;
  box-shadow:0 8px 18px rgba(49,126,251,.35);
  transition:.25s ease;
}

.controls button:hover{
  transform:translateY(-2px);
}

.controls button:active{
  transform:scale(.96);
}

/* ================= FORMS ================= */
.form{ margin-top:16px; }

.grid{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

label{
  flex:1 1 240px;
  font-size:13px;
  font-weight:600;
  color:#334155;
}

input, select{
  width:100%;
  padding:12px;
  margin-top:6px;
  border-radius:12px;
  border:1px solid #d1d5db;
  font-size:14px;
  background:#f8fafc;
}

/* ================= TABLE ================= */
.table-wrap{
  overflow-x:auto;
  margin-top:14px;
}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
}

th, td{
  padding:10px;
  font-size:13px;
  border-bottom:1px solid #e5e7eb;
}

th{
  background:#f1f5f9;
  font-weight:700;
}

/* ================= FOOTER ================= */
footer{
  margin:22px auto;
  text-align:center;
  padding:16px 12px;
  max-width:880px;
  border-radius:18px;
  background:linear-gradient(135deg,#317efb,#1b9a59,#f97316);
  background-size:300% 300%;
  animation:footerGradient 6s ease infinite;
}

footer small{
  color:#fff;
  font-size:13px;
  font-weight:600;
}

/* =====================================================
   📱 MOBILE OPTIMIZATION (ONLY MOBILE – PC UNCHANGED)
===================================================== */
@media (max-width:600px){

  /* Header & Logo */
  header{ padding:18px 12px 22px; }
  header h1{ font-size:20px; }
  .subtitle{ font-size:12px; }

  .app-logo{
    width:56px;
    height:56px;
    margin-bottom:4px;
  }

  /* Dashboard cards smaller */
  .dashboard{
    gap:8px;
    padding:10px 8px;
  }

  .dashboard .card{
    min-width:120px;
    padding:8px 6px;
    border-radius:12px;
    box-shadow:0 6px 16px rgba(0,0,0,.08);
  }

  .dashboard .card{
    font-size:10px;
  }

  .dashboard .card span{
    font-size:16px;
    margin-top:4px;
  }

  /* Forms stack */
  .grid{
    flex-direction:column;
    gap:10px;
  }

  label{
    font-size:12px;
  }

  input, select{
    padding:10px;
    font-size:14px;
  }

  /* Buttons compact */
  .controls button{
    min-height:44px;
    font-size:13px;
    padding:10px 12px;
  }

  /* Tables compact for missed & makeup */
  th, td{
    padding:6px 6px;
    font-size:11px;
  }

  table{
    border-radius:10px;
  }

  /* Container spacing */
  .container{
    padding:14px;
    margin:14px 8px;
  }

  footer{
    margin:14px 8px;
    padding:12px;
  }

  footer small{
    font-size:11px;
  }
}

/* ================= ANIMATIONS ================= */
@keyframes footerGradient{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

@keyframes titleGradient{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

@keyframes logoPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.06)}
}
.total-missed {
  display: none !important;
}
/* ======== MOBILE SPACING FIX FOR MISSED & MAKEUP ======== */
@media (max-width: 768px) {

  /* Reduce space between all form sections */
  .form {
    padding: 10px !important;
    margin-top: 6px !important;
  }

  /* Reduce gap between grid rows */
  .form .grid {
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  /* Reduce space under each label/input block */
  .form label {
    margin-bottom: 6px !important;
  }

  /* Reduce input/select height slightly */
  .form input,
  .form select {
    padding: 6px 8px !important;
  }

  /* Reduce big heading gap */
  .form h2 {
    margin-bottom: 6px !important;
    margin-top: 2px !important;
  }
}
/* ================= ROLE SELECT ================= */

.role-select {
  text-align:center;
  margin:40px 0;
}

.role-grid {
  display:flex;
  justify-content:center;
  gap:20px;
  flex-wrap:wrap;
}

.role-card {
  background:#fff;
  padding:25px;
  border-radius:14px;
  border:2px solid #eaeaea;
  width:220px;
  font-size:18px;
  cursor:pointer;
  transition:0.3s;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.role-card span {
  font-size:13px;
  color:#666;
}

.role-card:hover {
  border-color:#0A7E4A;
  transform:translateY(-4px);
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}
