@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500&family=IBM+Plex+Mono:wght@400;500&display=swap');

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

/* ✅ ลบ :root ซ้ำออก เหลืออันเดียว */
:root {
    --green:     #1D9E75;
    --green-bg:  #E1F5EE;
    --green-tx:  #0F6E56;
    --red:       #E24B4A;
    --red-bg:    #FCEBEB;
    --red-tx:    #A32D2D;
    --gray-bg:   #F1EFE8;
    --gray-tx:   #5F5E5A;
    --border:    rgba(0,0,0,0.08);
    --radius:    14px;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-thai: 'IBM Plex Sans Thai', sans-serif;
}

body {
    font-family: var(--font-thai);
    background: #f5f4f0;
}

/* ─────────────────────────────────────────
   Layout
───────────────────────────────────────── */
.att-wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 48px;
}

.att-screen {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─────────────────────────────────────────
   Card
───────────────────────────────────────── */
.att-card {
    background: #fff;
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

/* ─────────────────────────────────────────
   Profile
───────────────────────────────────────── */
.profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green-tx);
    font-weight: 500;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-name {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.profile-branch {
    font-size: 12px;
    color: #888;
}

/* ─────────────────────────────────────────
   Status Badge
───────────────────────────────────────── */
.status-badge {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-idle     { background: var(--gray-bg);  color: var(--gray-tx);  }
.badge-checkin  { background: var(--green-bg); color: var(--green-tx); }
.badge-checkout { background: var(--red-bg);   color: var(--red-tx);   }

/* ─────────────────────────────────────────
   Clock
───────────────────────────────────────── */
.clock-date {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.clock-time {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 46px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: -1px;
    line-height: 1;
    padding: 6px 0 10px;
}

/* ─────────────────────────────────────────
   GPS Location
───────────────────────────────────────── */
.loc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    background: #f9f9f7;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 4px;
}

.loc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background .3s;
}

.loc-dot.inside  { background: var(--green); }
.loc-dot.outside { background: var(--red);   }

/* ─────────────────────────────────────────
   Action Button
───────────────────────────────────────── */
.btn-action {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-thai);
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    color: #fff;
}

.btn-action:active { opacity: .85; transform: scale(0.99); }
.btn-checkin       { background: var(--green); }
.btn-checkout      { background: var(--red);   }
.btn-disabled      { background: #ccc; cursor: not-allowed; }

.btn-sub {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
}

/* ─────────────────────────────────────────
   Stats Grid
───────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* mobile: 2 คอลัมน์ */
    gap: 10px;
}

@media (min-width: 480px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);  /* tablet/desktop: 4 คอลัมน์ */
    }
.stat-box {
    background: #f9f9f7;
    border-radius: 10px;
    padding: 12px 14px;
}
}

.stat-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 500;
    font-family: var(--font-mono);
    color: #1a1a1a;
}

/* ─────────────────────────────────────────
   Log List
───────────────────────────────────────── */
.log-section-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.log-empty {
    font-size: 13px;
    color: #bbb;
    text-align: center;
    padding: 8px 0;
}

.log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 0.5px solid #f0f0ec;
    font-size: 13px;
}

.log-item:last-child { border-bottom: none; }

.log-type {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
}

.log-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.log-time {
    color: #aaa;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ─────────────────────────────────────────
   History Link
───────────────────────────────────────── */
.history-link {
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
}

.history-link a {
    color: var(--green-tx);
    text-decoration: none;
}

.history-link a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   Toast Notification
───────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: all .3s ease;
    z-index: 999;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.card  .admin-dashboard  p{
     margin-bottom: 4px; 
}