:root{
  --primary:#174f7c; --primary2:#0f3b5f; --bg:#f3f6fa; --text:#1f2937;
  --muted:#64748b; --border:#dbe3ec; --success:#15803d; --danger:#b91c1c;
}
*{box-sizing:border-box}
body{margin:0;font-family:Tahoma,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--primary);text-decoration:none}
.topbar{display:flex;align-items:center;justify-content:space-between;background:var(--primary);color:#fff;padding:16px 28px;position:sticky;top:0;z-index:10}
.brand{font-weight:700;font-size:20px}
.topbar nav{display:flex;gap:18px;flex-wrap:wrap}
.topbar nav a{color:#fff}
.container{max-width:1180px;margin:28px auto;padding:0 18px}
.card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:22px;box-shadow:0 4px 14px rgba(15,23,42,.05);margin-bottom:20px}
.login-wrap{min-height:90vh;display:grid;place-items:center}
.login-card{width:min(420px,92vw)}
.login-card h1{margin-bottom:4px}
label{display:block;font-weight:700;margin:14px 0 6px}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;font:inherit}
textarea{resize:vertical}
.btn{display:inline-block;border:1px solid var(--border);background:#fff;color:var(--text);padding:10px 16px;border-radius:9px;cursor:pointer;font-weight:700}
.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn.primary:hover{background:var(--primary2)}
.page-head,.card-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.page-head h1,.card-head h2{margin:0}
.muted{color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}
.stat{background:#fff;border:1px solid var(--border);border-left:5px solid var(--primary);border-radius:12px;padding:18px}
.stat span{display:block;color:var(--muted);margin-bottom:8px}.stat strong{font-size:34px}
.stat.warning{border-left-color:#d97706}.stat.info{border-left-color:#0284c7}.stat.success{border-left-color:#16a34a}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:720px}
th,td{text-align:left;padding:13px 10px;border-bottom:1px solid #e5e7eb;vertical-align:top}
th{background:#f8fafc}
.empty{text-align:center;color:var(--muted);padding:28px}
.badge{display:inline-block;background:#e8eef5;color:var(--primary2);padding:5px 10px;border-radius:999px;font-size:13px}
.badge.large{font-size:15px}
.filters{display:grid;grid-template-columns:1fr 220px auto;gap:12px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.field.full,.actions.full{grid-column:1/-1}
.two-col{display:grid;grid-template-columns:2fr 1fr;gap:20px}
.details{display:grid;grid-template-columns:150px 1fr;gap:12px 18px}.details dt{font-weight:700}.details dd{margin:0}.pre{white-space:pre-wrap}
.comment{border-top:1px solid var(--border);padding:14px 0}.comment:first-of-type{border-top:0}.comment span{float:right;color:var(--muted);font-size:13px}
.comment-form{margin-top:18px}.comment-form .btn{margin-top:10px}
.alert{padding:12px 15px;border-radius:9px;margin-bottom:14px}.alert.success{background:#dcfce7;color:#166534}.alert.danger{background:#fee2e2;color:#991b1b}
.error-box{text-align:center;padding:60px}.error-box h1{font-size:72px;margin:0}
@media(max-width:800px){
  .topbar{align-items:flex-start;flex-direction:column}.stats{grid-template-columns:1fr 1fr}.two-col{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}.filters{grid-template-columns:1fr}.page-head{align-items:flex-start;flex-direction:column}
}
/* ===== Thep.Click Login ===== */

body:has(.thep-login-page) {
  margin: 0;
  background: #032f71;
}

body:has(.thep-login-page) .container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.thep-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    linear-gradient(rgba(0, 42, 105, 0.15), rgba(0, 42, 105, 0.12)),
    url("/static/login-background.png") center center / cover no-repeat;
}

.thep-login-card {
  width: min(550px, 94vw);
  padding: 38px 44px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 25px;
  box-shadow: 0 24px 70px rgba(0, 30, 80, 0.35);
  backdrop-filter: blur(8px);
}

.thep-brand {
  text-align: center;
  margin-bottom: 22px;
}

.thep-logo-icon {
  font-size: 58px;
  line-height: 1;
  color: #0867d7;
}

.thep-brand h1 {
  margin: 8px 0 0;
  font-size: 46px;
  color: #07152b;
}

.thep-brand h2 {
  margin: 3px 0 0;
  font-size: 24px;
  letter-spacing: 1px;
  color: #0867d7;
}

.thep-brand p {
  margin-top: 15px;
  color: #63718a;
  font-size: 17px;
}

.thep-login-form label {
  display: block;
  margin: 16px 0 7px;
  font-weight: 700;
  font-size: 17px;
  color: #12233c;
}

.thep-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #c8d5e5;
  border-radius: 12px;
}

.thep-input:focus-within {
  border-color: #0867d7;
  box-shadow: 0 0 0 4px rgba(8, 103, 215, 0.13);
}

.thep-input span {
  font-size: 19px;
}

.thep-input input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 14px 2px;
  font-size: 16px;
  background: transparent;
  box-shadow: none;
}

.thep-login-button {
  width: 100%;
  margin-top: 25px;
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #0873e6, #0053b9);
  color: white;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 85, 190, 0.3);
}

.thep-login-button:hover {
  transform: translateY(-1px);
}

.thep-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid #dbe5f1;
  text-align: center;
}

.thep-features strong {
  display: block;
  font-size: 13px;
  color: #102441;
}

.thep-features small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
  color: #718096;
}

@media (max-width: 680px) {
  .thep-login-card {
    padding: 28px 22px 22px;
  }

  .thep-brand h1 {
    font-size: 36px;
  }

  .thep-features {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Thep.Click Login Theme v1 ===== */
body:has(.thep-login-page){margin:0;overflow-x:hidden;background:#062e69}
body:has(.thep-login-page) .container{max-width:none;margin:0;padding:0}
.thep-login-page{min-height:100vh;display:grid;place-items:center;padding:34px 18px;background:linear-gradient(90deg,rgba(0,41,105,.14),rgba(255,255,255,.03),rgba(0,65,145,.12)),url("/static/login-background.png") center center/cover no-repeat fixed}
.thep-login-card{width:min(560px,94vw);padding:36px 44px 28px;border:1px solid rgba(190,211,235,.8);border-radius:26px;background:rgba(255,255,255,.965);box-shadow:0 28px 80px rgba(0,33,82,.36),0 8px 30px rgba(0,0,0,.13);backdrop-filter:blur(9px)}
.thep-brand{text-align:center;margin-bottom:22px}
.thep-logo-mark{position:relative;display:inline-block;width:88px;height:67px;color:#0867d7}
.cloud-shape{position:absolute;inset:-8px 0 0;font-size:72px;line-height:1;font-family:Arial,sans-serif}
.cursor-shape{position:absolute;right:3px;bottom:1px;font-size:34px;transform:rotate(-35deg);color:#075bc0;text-shadow:0 3px 8px rgba(0,70,170,.25)}
.thep-brand h1{margin:7px 0 0;font-size:48px;line-height:1.05;letter-spacing:-1.2px;color:#08162d}
.thep-brand h2{display:flex;align-items:center;justify-content:center;gap:13px;margin:7px 0 0;color:#0867d7;font-size:24px;letter-spacing:1px}
.thep-brand h2 span{display:block;width:62px;height:2px;background:#0867d7}
.thep-brand p{margin:17px 0 0;color:#64748b;font-size:16px}
.thep-login-form label{display:block;margin:16px 0 7px;color:#12233c;font-size:17px;font-weight:800}
.thep-input{display:flex;align-items:center;gap:12px;padding:0 14px;border:1px solid #c8d5e5;border-radius:12px;background:#fff;transition:border-color .18s ease,box-shadow .18s ease}
.thep-input:focus-within{border-color:#0867d7;box-shadow:0 0 0 4px rgba(8,103,215,.13)}
.thep-input-icon{width:18px;text-align:center;color:#536987;font-size:16px}
.thep-input-icon.lock{border-radius:3px;color:#7a5b24}
.thep-input input{width:100%;padding:14px 2px;border:0;outline:0;background:transparent;box-shadow:none;font:inherit;font-size:16px}
.thep-login-button{width:100%;margin-top:25px;padding:14px 20px;border:0;border-radius:12px;color:#fff;background:linear-gradient(90deg,#0873e6,#0453bd);box-shadow:0 11px 25px rgba(0,82,190,.28);font:inherit;font-size:18px;font-weight:800;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.thep-login-button span{margin-right:7px}
.thep-login-button:hover{transform:translateY(-1px);box-shadow:0 15px 30px rgba(0,82,190,.35)}
.thep-features{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:28px;padding-top:20px;border-top:1px solid #dbe5f1;text-align:center}
.thep-features>div{padding:0 5px}
.feature-icon{display:block;margin-bottom:6px;color:#0867d7;font-size:22px}
.thep-features strong{display:block;color:#102441;font-size:13px}
.thep-features small{display:block;margin-top:4px;color:#718096;font-size:10px;line-height:1.4}
@media(max-width:680px){.thep-login-page{padding:18px 12px;background-attachment:scroll}.thep-login-card{padding:28px 22px 22px;border-radius:20px}.thep-brand h1{font-size:37px}.thep-brand h2{font-size:20px}.thep-brand h2 span{width:32px}.thep-features{grid-template-columns:1fr 1fr;row-gap:15px}}
/* ===== End Thep.Click Login Theme ===== */
