/* theme green-white (ราชการ) */
:root{
  --green:#2e7d32;
  --green-dark:#1b5e20;
  --bg:#f4f7f4;
  --card:#ffffff;
  --muted:#6b7280;
  --danger:#c62828;
  --warning:#f9a825;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: "Tahoma","Sarabun", Arial, sans-serif;
  background:var(--bg);
  color:#111827;
}

a{ color:var(--green-dark); text-decoration:none; }
a:hover{ text-decoration:underline; }

.topbar{
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  color:#fff;
  padding:14px 10px;
  text-align:center;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.topbar .brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}
.topbar img{
  width:44px; height:44px;
  background:#fff;
  border-radius:50%;
  padding:4px;
}
.topbar .title{
  line-height:1.15;
}
.topbar .title .h1{
  font-size:18px;
  font-weight:bold;
}
.topbar .title .h2{
  font-size:13px;
  opacity:.95;
}

.container{
  max-width:1200px;
  margin:16px auto;
  padding:0 12px;
}

.card{
  background:var(--card);
  border-radius:14px;
  box-shadow:0 10px 24px rgba(16,24,40,.06);
  border:1px solid rgba(0,0,0,.06);
}
.card-header{
  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.card-header h3{
  margin:0;
  font-size:16px;
}
.card-body{ padding:14px; }

.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  color:#fff;
}

.btn{
  display:inline-block;
  padding:8px 12px;
  border-radius:10px;
  border:0;
  cursor:pointer;
  font-size:14px;
}
.btn-green{ background:var(--green); color:#fff; }
.btn-green:hover{ background:var(--green-dark); }
.btn-outline{
  background:#fff; color:var(--green-dark);
  border:1px solid rgba(46,125,50,.35);
}
.btn-outline:hover{ background:#eef6ef; }
.btn-danger{ background:var(--danger); color:#fff; }
.btn-danger:hover{ filter:brightness(.95); }
.btn-gray{ background:#374151; color:#fff; }
.btn-gray:hover{ filter:brightness(.95); }

.grid{
  display:grid;
  gap:12px;
}
.grid-2{ grid-template-columns: 1.2fr .8fr; }
@media(max-width:980px){
  .grid-2{ grid-template-columns:1fr; }
}

.table{
  width:100%;
  border-collapse:collapse;
}
.table th, .table td{
  border-bottom:1px solid rgba(0,0,0,.06);
  padding:8px 8px;
  text-align:left;
  font-size:13px;
}
.table th{ color:#111827; background:#f8fafc; }

.footer{
  margin-top:18px;
  background:#0f172a;
  color:#e5e7eb;
  padding:12px;
  text-align:center;
  font-size:12px;
}

.notice{
  background:#ecfdf5;
  border:1px solid rgba(46,125,50,.25);
  color:var(--green-dark);
  padding:10px 12px;
  border-radius:12px;
  margin-bottom:12px;
}

.modal-backdrop-custom{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  z-index:2000;
  display:none;
}
.modal-custom{
  position:fixed;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:min(720px, 92vw);
  background:#fff;
  border-radius:16px;
  z-index:2001;
  display:none;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
}
.modal-custom .m-head{
  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
  display:flex; justify-content:space-between; align-items:center;
}
.modal-custom .m-title{ font-weight:bold; }
.modal-custom .m-body{ padding:14px; max-height:70vh; overflow:auto; }
.modal-custom .m-foot{
  padding:12px 14px;
  border-top:1px solid rgba(0,0,0,.08);
  display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap;
}
.x-close{
  background:#f3f4f6; border:0; border-radius:10px;
  width:36px; height:36px; cursor:pointer;
}
.small{ font-size:12px; color:var(--muted); }
hr.sep{ border:0; border-top:1px solid rgba(0,0,0,.08); margin:12px 0; }

/* Login background */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  position:relative;
  overflow:hidden;
}
.login-bg{
  position:absolute; inset:0;
  background:url('../assets/images/ambulance.jpg') center/cover no-repeat;
  filter: blur(10px);
  transform:scale(1.08);
}
.login-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 10%, rgba(46,125,50,.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(46,125,50,.25), transparent 50%),
    linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.35));
}
.login-card{
  position:relative;
  width:min(460px, 94vw);
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.55);
  border-radius:18px;
  box-shadow:0 25px 70px rgba(0,0,0,.35);
  overflow:hidden;
}
.login-card .lc-head{
  background:linear-gradient(90deg,var(--green-dark),var(--green));
  padding:14px;
  color:#fff;
  text-align:center;
}
.login-card .lc-body{ padding:16px; }
.input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.15);
  outline:none;
}
.input:focus{
  border-color:rgba(46,125,50,.6);
  box-shadow:0 0 0 4px rgba(46,125,50,.12);
}
.label{ font-size:13px; margin:10px 0 6px; display:block; }
.error{
  background:#fef2f2;
  border:1px solid rgba(198,40,40,.25);
  color:#991b1b;
  padding:10px 12px;
  border-radius:12px;
  margin-bottom:12px;
}

/* dropdown admin menu */
.dropdown{
  position:relative;
  display:inline-block;
}

.dropdown-menu{
  display:none;
  position:absolute;
  background:#fff;
  min-width:210px;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
  border-radius:10px;
  overflow:hidden;
  z-index:999;
}

.dropdown-menu a{
  display:block;
  padding:10px 14px;
  text-decoration:none;
  color:#1f2937;
  font-size:14px;
}

.dropdown-menu a:hover{
  background:#f3f4f6;
}

.dropdown:hover .dropdown-menu{
  display:block;
}