/* sold.supply timeclock — shared styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #F6F5F1;
    color: #2C2C2A;
    line-height: 1.5;
    min-height: 100vh;
    padding: 16px;
}

/* Site header (brand + Instagram link) */
.site-header {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 2px 12px;
    gap: 12px;
    flex-wrap: wrap;
}
.site-header .brand {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    font-weight: 500;
    color: #2C2C2A;
    letter-spacing: -0.3px;
}
.site-header .ig-link,
.site-header .ig-link:visited {
    font-size: 13px;
    color: #5F5E5A;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s;
}
.site-header .ig-link:hover { color: #2C2C2A; }
.site-header .ig-link .ig-handle,
.site-header .ig-link:visited .ig-handle { font-weight: 500; color: #2C2C2A; }

/* Topnav */
.topnav {
    max-width: 1100px;
    margin: 0 auto 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 8px;
    flex-wrap: wrap;
}
.topnav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: #5F5E5A;
    font-weight: 400;
}
.topnav a.active { background: #fff; color: #2C2C2A; font-weight: 500; }
.topnav a:hover:not(.active) { background: rgba(0,0,0,0.04); }

/* Panels */
.panel {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 1.5rem;
}
.panel-tight { padding: 1rem 1.25rem; }

/* Cards (metric tiles) */
.metric {
    background: #EFEEE8;
    border-radius: 8px;
    padding: 1rem;
}
.metric .label { font-size: 13px; color: #5F5E5A; margin-bottom: 4px; }
.metric .value { font-size: 24px; font-weight: 500; }

/* Grid helpers */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
@media (max-width: 960px) {
    .grid-4[style*="repeat(6"] { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 720px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4[style*="repeat(6"] { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-2 { grid-template-columns: 1fr; }
}

/* Buttons */
button, .btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.15);
    background: #fff;
    cursor: pointer;
    transition: background 0.1s;
}
button:hover, .btn:hover { background: #F6F5F1; }
button:active { transform: scale(0.98); }
.btn-primary {
    background: #E6F1FB;
    color: #0C447C;
    border-color: rgba(23,95,171,0.3);
}
.btn-primary:hover { background: #D4E4F7; }
.btn-danger {
    color: #A32D2D;
    border-color: rgba(163,45,45,0.3);
}

/* Inputs */
input[type="text"], input[type="number"], input[type="password"], input[type="time"], input[type="date"], select {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    background: #fff;
    height: 36px;
    width: 100%;
}
input:focus, select:focus { outline: none; border-color: rgba(23,95,171,0.5); box-shadow: 0 0 0 3px rgba(23,95,171,0.1); }

/* Tables */
table { width: 100%; font-size: 13px; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: #5F5E5A; padding: 8px; border-bottom: 1px solid rgba(0,0,0,0.08); }
th:first-child { padding-left: 0; }
td { padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,0.06); }
td:first-child { padding-left: 0; }
tr:last-child td { border-bottom: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; }

/* Pills */
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}
.pill-in { background: #E1F5EE; color: #085041; }
.pill-out { background: #EFEEE8; color: #5F5E5A; font-weight: 400; }
.pill-normal { background: #EFEEE8; color: #5F5E5A; font-weight: 400; } /* legacy */
.pill-remote { background: #FAEEDA; color: #633806; }                  /* legacy */
.pill-store  { background: #EFEEE8; color: #5F5E5A; font-weight: 400; }
.pill-phone  { background: #FAEEDA; color: #633806; }
.pill-manual { background: #EEEDFE; color: #3C3489; font-weight: 500; }
.pill-manager { background: #E6F1FB; color: #0C447C; font-size: 11px; padding: 2px 6px; margin-left: 4px; }

/* Clocked-in list tiles */
.clocked-in-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #E1F5EE;
    border-radius: 8px;
    margin-bottom: 6px;
}
.clocked-in-tile .name { font-weight: 500; color: #085041; font-size: 14px; }
.clocked-in-tile .role { font-size: 12px; color: #085041; opacity: 0.85; }
.clocked-in-tile .since { text-align: right; font-size: 12px; color: #085041; }

/* Forgot to clock out (open shift >= threshold hours) */
.clocked-in-tile.forgot { background: #FAEEDA; }
.clocked-in-tile.forgot .name,
.clocked-in-tile.forgot .role,
.clocked-in-tile.forgot .since { color: #633806; }
.clocked-in-tile.forgot .warn { margin-right: 6px; }

/* Result banners (kiosk feedback) */
.banner {
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid;
}
.banner-success { background: #E1F5EE; color: #085041; border-color: rgba(8,80,65,0.3); }
.banner-warning { background: #FAEEDA; color: #633806; border-color: rgba(99,56,6,0.3); }
.banner-danger  { background: #FCEBEB; color: #791F1F; border-color: rgba(121,31,31,0.3); }
.banner-sub { font-size: 13px; margin-top: 2px; opacity: 0.85; }

/* Kiosk-specific */
.kiosk-display {
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    min-height: 38px;
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.keypad button {
    padding: 16px;
    font-size: 20px;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Login gate */
.gate {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}
.gate input[type="password"] {
    width: 140px;
    text-align: center;
    font-size: 20px;
    letter-spacing: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.gate-error { font-size: 12px; color: #A32D2D; margin-top: 10px; min-height: 16px; }

/* Text utilities */
.t-secondary { color: #5F5E5A; }
.t-tertiary { color: #888780; }
.t-success { color: #085041; }
.t-danger { color: #A32D2D; }
.t-warning { color: #633806; }
.t-14 { font-size: 14px; }
.t-13 { font-size: 13px; }
.t-12 { font-size: 12px; }
.t-11 { font-size: 11px; }
.fw-500 { font-weight: 500; }
.mb-1 { margin-bottom: 12px; }
.mb-2 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 12px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.container { max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 860px; margin: 0 auto; }

/* ============ DARK MODE ============ */
html[data-theme="dark"] body {
    background: #1a1a19;
    color: #e8e6dd;
}
html[data-theme="dark"] .topnav {
    border-bottom-color: rgba(255,255,255,0.1);
}
html[data-theme="dark"] .topnav a { color: #a8a69b; }
html[data-theme="dark"] .topnav a.active {
    background: #2c2c2a;
    color: #e8e6dd;
}
html[data-theme="dark"] .topnav a:hover:not(.active) { background: rgba(255,255,255,0.05); }
html[data-theme="dark"] .panel {
    background: #242422;
    border-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .metric {
    background: #2c2c2a;
}
html[data-theme="dark"] .metric .label { color: #a8a69b; }
html[data-theme="dark"] button,
html[data-theme="dark"] .btn {
    background: #2c2c2a;
    border-color: rgba(255,255,255,0.15);
    color: #e8e6dd;
}
html[data-theme="dark"] button:hover,
html[data-theme="dark"] .btn:hover { background: #363634; }
html[data-theme="dark"] .btn-primary {
    background: #1a3a5c;
    color: #b5d4f4;
    border-color: rgba(181,212,244,0.3);
}
html[data-theme="dark"] .btn-primary:hover { background: #234870; }
html[data-theme="dark"] .btn-danger { color: #e24b4a; }
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] select {
    background: #2c2c2a;
    border-color: rgba(255,255,255,0.15);
    color: #e8e6dd;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus {
    border-color: rgba(181,212,244,0.5);
    box-shadow: 0 0 0 3px rgba(181,212,244,0.1);
}
html[data-theme="dark"] th {
    color: #a8a69b;
    border-bottom-color: rgba(255,255,255,0.1);
}
html[data-theme="dark"] td {
    border-bottom-color: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .pill-out { background: #2c2c2a; color: #a8a69b; }
html[data-theme="dark"] .pill-normal { background: #2c2c2a; color: #a8a69b; }
html[data-theme="dark"] .pill-in { background: #1f3d32; color: #5DCAA5; }
html[data-theme="dark"] .pill-remote { background: #3d2e10; color: #EF9F27; }
html[data-theme="dark"] .pill-store  { background: #2c2c2a; color: #a8a69b; }
html[data-theme="dark"] .pill-phone  { background: #3d2e10; color: #EF9F27; }
html[data-theme="dark"] .pill-manual { background: #2a2552; color: #AFA9EC; }
html[data-theme="dark"] .pill-manager { background: #1a3a5c; color: #85B7EB; }
html[data-theme="dark"] .clocked-in-tile { background: #1f3d32; }
html[data-theme="dark"] .clocked-in-tile .name,
html[data-theme="dark"] .clocked-in-tile .role,
html[data-theme="dark"] .clocked-in-tile .since { color: #5DCAA5; }
html[data-theme="dark"] .clocked-in-tile.forgot { background: #3d2e10; }
html[data-theme="dark"] .clocked-in-tile.forgot .name,
html[data-theme="dark"] .clocked-in-tile.forgot .role,
html[data-theme="dark"] .clocked-in-tile.forgot .since { color: #EF9F27; }
html[data-theme="dark"] .banner-success { background: #1f3d32; color: #5DCAA5; border-color: rgba(93,202,165,0.3); }
html[data-theme="dark"] .banner-warning { background: #3d2e10; color: #EF9F27; border-color: rgba(239,159,39,0.3); }
html[data-theme="dark"] .banner-danger { background: #3d1a1a; color: #E24B4A; border-color: rgba(226,75,74,0.3); }
html[data-theme="dark"] .t-secondary { color: #a8a69b; }
html[data-theme="dark"] .t-tertiary { color: #7a7970; }
html[data-theme="dark"] .t-success { color: #5DCAA5; }
html[data-theme="dark"] .t-danger  { color: #E24B4A; }
html[data-theme="dark"] .t-warning { color: #EF9F27; }
html[data-theme="dark"] .site-header .brand { color: #e8e6dd; }
html[data-theme="dark"] .site-header .ig-link,
html[data-theme="dark"] .site-header .ig-link:visited { color: #a8a69b; }
html[data-theme="dark"] .site-header .ig-link:hover { color: #e8e6dd; }
html[data-theme="dark"] .site-header .ig-link .ig-handle,
html[data-theme="dark"] .site-header .ig-link:visited .ig-handle { color: #e8e6dd; }

/* Theme toggle button */
.theme-toggle {
    font-size: 16px;
    padding: 4px 8px;
    margin-left: 12px;
    border: 1px solid rgba(0,0,0,0.15);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: inherit;
}
html[data-theme="dark"] .theme-toggle {
    background: #2c2c2a;
    border-color: rgba(255,255,255,0.15);
    color: #e8e6dd;
}
