/* ==========================================================================
   WCWT Workforce Terminal -- Front-end styles v1.2.12
   Light theme (default) + Dark theme (.wcwt-light)
   Cyan accent: #00f2ff | Light accent: #0066cc
   ========================================================================== */

/* -- Reset -------------------------------------------------------------------- */
.wcwt-terminal *, .wcwt-terminal *::before, .wcwt-terminal *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================================
   LIGHT THEME is applied by default via JS (.wcwt-light); these are the dark base tokens
   ============================================================================ */

.wcwt-terminal {
    --wcwt-accent:        #00f2ff;
    --wcwt-accent-dim:    rgba(0, 242, 255, 0.15);
    --wcwt-accent-glow:   rgba(0, 242, 255, 0.3);
    --wcwt-bg:            linear-gradient(145deg, #050f1f 0%, #0a1a2e 50%, #071628 100%);
    --wcwt-border:        rgba(0, 242, 255, 0.35);
    --wcwt-border-faint:  rgba(0, 242, 255, 0.15);
    --wcwt-panel-bg:      rgba(0, 10, 25, 0.4);
    --wcwt-card-bg:       rgba(0, 15, 35, 0.6);
    --wcwt-header-bg:     rgba(0, 242, 255, 0.05);
    --wcwt-panel-hdr-bg:  rgba(0, 242, 255, 0.06);
    --wcwt-text:          #d0e8ff;
    --wcwt-text-muted:    rgba(154, 200, 224, 0.65);
    --wcwt-text-dim:      rgba(154, 200, 224, 0.4);
    --wcwt-clock-color:   #e6f4ff;
    --wcwt-date-color:    rgba(180, 210, 240, 0.7);
    --wcwt-status-on:     #00ff9f;
    --wcwt-status-out:    rgba(154, 200, 224, 0.5);
    --wcwt-status-break:  #f5a623;
    --wcwt-progress-bg:   rgba(0, 242, 255, 0.1);
    --wcwt-progress-fill: linear-gradient(90deg, #0090c0, #00f2ff);
    --wcwt-grid-line:     rgba(0, 242, 255, 0.08);
    --wcwt-tick:          rgba(154, 200, 224, 0.5);
    --wcwt-shadow:        0 0 40px rgba(0, 242, 255, 0.08), inset 0 1px 0 rgba(0, 242, 255, 0.12);
    --wcwt-logo-color:    #00f2ff;
    --wcwt-ctrl-bg:       rgba(0, 242, 255, 0.08);
    --wcwt-ctrl-hover:    rgba(0, 242, 255, 0.18);
    --wcwt-ctrl-border:   rgba(0, 242, 255, 0.3);
    --wcwt-ctrl-color:    #00f2ff;
    --wcwt-notif-bg:      rgba(0, 15, 35, 0.5);

    background: var(--wcwt-bg);
    border: 1px solid var(--wcwt-border);
    border-radius: 14px;
    color: var(--wcwt-text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: var(--wcwt-shadow);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, max-width 0.2s ease;
}

/* ============================================================================
   LIGHT THEME (.wcwt-light)
   ============================================================================ */

.wcwt-terminal.wcwt-light {
    --wcwt-accent:        #0066cc;
    --wcwt-accent-dim:    rgba(0, 102, 204, 0.12);
    --wcwt-accent-glow:   rgba(0, 102, 204, 0.2);
    --wcwt-bg:            linear-gradient(145deg, #f0f6ff 0%, #e8f2fa 50%, #f4f8ff 100%);
    --wcwt-border:        rgba(0, 102, 204, 0.3);
    --wcwt-border-faint:  rgba(0, 102, 204, 0.12);
    --wcwt-panel-bg:      rgba(255, 255, 255, 0.75);
    --wcwt-card-bg:       rgba(255, 255, 255, 0.9);
    --wcwt-header-bg:     rgba(0, 102, 204, 0.04);
    --wcwt-panel-hdr-bg:  rgba(0, 102, 204, 0.05);
    --wcwt-text:          #1a2c42;
    --wcwt-text-muted:    rgba(30, 60, 100, 0.65);
    --wcwt-text-dim:      rgba(30, 60, 100, 0.4);
    --wcwt-clock-color:   #0d1f38;
    --wcwt-date-color:    rgba(30, 60, 100, 0.65);
    --wcwt-status-on:     #008850;
    --wcwt-status-out:    rgba(30, 60, 100, 0.45);
    --wcwt-status-break:  #c05a00;
    --wcwt-progress-bg:   rgba(0, 102, 204, 0.08);
    --wcwt-progress-fill: linear-gradient(90deg, #0055aa, #0099ff);
    --wcwt-grid-line:     rgba(0, 102, 204, 0.08);
    --wcwt-tick:          rgba(30, 60, 100, 0.45);
    --wcwt-shadow:        0 4px 24px rgba(0, 102, 204, 0.1), 0 1px 4px rgba(0,0,0,0.05);
    --wcwt-logo-color:    #0066cc;
    --wcwt-ctrl-bg:       rgba(0, 102, 204, 0.07);
    --wcwt-ctrl-hover:    rgba(0, 102, 204, 0.15);
    --wcwt-ctrl-border:   rgba(0, 102, 204, 0.25);
    --wcwt-ctrl-color:    #0066cc;
    --wcwt-notif-bg:      rgba(255, 255, 255, 0.7);
}

/* -- SVG Logo -- currentColor driven ------------------------------------------- */
.wcwt-logo { color: var(--wcwt-logo-color); }
.wcwt-logo .wcwt-logo-stroke { stroke: var(--wcwt-logo-color); }
.wcwt-logo .wcwt-logo-fill   { fill: var(--wcwt-logo-color); }

/* -- Header -------------------------------------------------------------------- */
.wcwt-header {
    background: var(--wcwt-header-bg);
    border-bottom: 1px solid var(--wcwt-border-faint);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wcwt-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.wcwt-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px var(--wcwt-accent-glow));
}

.wcwt-terminal-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--wcwt-clock-color);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -- Header Controls ----------------------------------------------------------- */
.wcwt-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wcwt-ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--wcwt-ctrl-border);
    background: var(--wcwt-ctrl-bg);
    color: var(--wcwt-ctrl-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.15s, box-shadow 0.15s;
    padding: 0;
    line-height: 1;
}

.wcwt-ctrl-btn:hover {
    background: var(--wcwt-ctrl-hover);
    box-shadow: 0 0 8px var(--wcwt-accent-glow);
}

/* Scale slider wrap */
.wcwt-scale-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--wcwt-ctrl-bg);
    border: 1px solid var(--wcwt-ctrl-border);
    border-radius: 6px;
    padding: 4px 10px;
    height: 32px;
}

.wcwt-scale-icon {
    color: var(--wcwt-ctrl-color);
    font-size: 14px;
    opacity: 0.8;
}

.wcwt-scale-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: var(--wcwt-progress-bg);
    outline: none;
    cursor: pointer;
}

.wcwt-scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wcwt-accent);
    cursor: pointer;
    box-shadow: 0 0 4px var(--wcwt-accent-glow);
}

.wcwt-scale-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wcwt-accent);
    cursor: pointer;
    border: none;
}

.wcwt-scale-value {
    font-size: 12px;
    color: var(--wcwt-text-muted);
    min-width: 30px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* -- Fullscreen mode ----------------------------------------------------------- */
.wcwt-terminal.wcwt-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    max-width: none;
    border-radius: 0;
    overflow-y: auto;
    margin: 0;
    border: none;
}

/* In admin backend, override WP chrome */
body.wcwt-fs-active #wpcontent,
body.wcwt-fs-active #wpfooter {
    overflow: hidden;
}

/* -- Main grid ---------------------------------------------------------------- */
.wcwt-grid {
    display: grid;
    grid-template-columns: 42% 58%;
    min-height: 560px;
}

.wcwt-left {
    border-right: 1px solid var(--wcwt-border-faint);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wcwt-right {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* -- Clock panel -------------------------------------------------------------- */
.wcwt-clock-panel { text-align: center; padding: 8px 0 16px; }

.wcwt-clock-time {
    font-size: 52px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--wcwt-clock-color);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 0 0 20px var(--wcwt-accent-dim);
}

.wcwt-clock-date {
    font-size: 13px;
    color: var(--wcwt-date-color);
    letter-spacing: 0.06em;
    margin-bottom: 26px;
}

/* -- Action buttons ----------------------------------------------------------- */
.wcwt-btn-action {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: var(--wcwt-accent-dim);
    border: 2px solid var(--wcwt-accent);
    border-radius: 6px;
    color: var(--wcwt-accent);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.wcwt-btn-action:hover {
    background: var(--wcwt-accent-glow);
    box-shadow: 0 0 18px var(--wcwt-accent-glow);
}

.wcwt-btn-action:active { transform: scale(0.98); }

.wcwt-btn-action.is-in {
    border-color: #ff4f6a;
    color: #ff4f6a;
    background: rgba(255, 79, 106, 0.07);
}

.wcwt-btn-action.is-in:hover {
    background: rgba(255, 79, 106, 0.15);
    box-shadow: 0 0 18px rgba(255, 79, 106, 0.25);
}

.wcwt-terminal.wcwt-light .wcwt-btn-action.is-in {
    border-color: #cc1133;
    color: #cc1133;
    background: rgba(204, 17, 51, 0.06);
}

.wcwt-btn-break {
    display: block;
    width: 100%;
    padding: 11px 24px;
    background: rgba(245, 166, 35, 0.08);
    border: 2px solid #f5a623;
    border-radius: 6px;
    color: #f5a623;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
}

.wcwt-btn-break:hover { background: rgba(245,166,35,0.16); box-shadow: 0 0 14px rgba(245,166,35,0.25); }
.wcwt-btn-break.is-on-break { border-color: var(--wcwt-status-on); color: var(--wcwt-status-on); background: rgba(0,200,100,0.06); }

/* -- Panel shell -------------------------------------------------------------- */
.wcwt-panel {
    border: 1px solid var(--wcwt-border-faint);
    border-radius: 8px;
    overflow: hidden;
    background: var(--wcwt-panel-bg);
}

.wcwt-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 15px;
    background: var(--wcwt-panel-hdr-bg);
    border-bottom: 1px solid var(--wcwt-border-faint);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--wcwt-text-muted);
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
}

.wcwt-panel-header:hover { background: var(--wcwt-accent-dim); }
.wcwt-chevron { font-size: 14px; color: var(--wcwt-accent); transition: transform 0.2s; }
.wcwt-panel.is-collapsed .wcwt-chevron { transform: rotate(180deg); }
.wcwt-panel.is-collapsed .wcwt-panel-body { display: none; }
.wcwt-panel-body { padding: 13px 15px; }

/* -- Logs table --------------------------------------------------------------- */
.wcwt-logs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wcwt-logs-table th { font-size: 12px; letter-spacing: 0.1em; color: var(--wcwt-text-muted); padding: 0 0 8px; text-align: left; border-bottom: 1px solid var(--wcwt-border-faint); }
.wcwt-logs-table td { padding: 7px 4px; border-bottom: 1px solid rgba(128,128,128,0.06); color: var(--wcwt-text); vertical-align: middle; }
.wcwt-logs-table tr:last-child td { border-bottom: none; }
.wcwt-logs-empty td { color: var(--wcwt-text-dim); text-align: center; padding: 20px; font-size: 13px; }
.wcwt-log-activity { font-weight: 600; letter-spacing: 0.05em; font-size: 13px; color: var(--wcwt-text-muted); }
.wcwt-log-status-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; }
.wcwt-status-completed { background: rgba(0,200,100,0.12); color: #00c864; }
.wcwt-status-pending   { background: rgba(245,166,35,0.12); color: #f5a623; }
.wcwt-status-open      { background: var(--wcwt-accent-dim); color: var(--wcwt-accent); }
.wcwt-terminal.wcwt-light .wcwt-status-completed { color: #006633; background: rgba(0,150,80,0.1); }
.wcwt-terminal.wcwt-light .wcwt-status-open      { color: #0066cc; background: rgba(0,102,204,0.1); }

/* -- Metrics panel ------------------------------------------------------------ */
.wcwt-metrics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 11px; }
.wcwt-metrics-row:last-child { margin-bottom: 0; }
.wcwt-metric-card { background: var(--wcwt-card-bg); border: 1px solid rgba(128,128,128,0.1); border-radius: 8px; padding: 13px; }
.wcwt-metric-label { font-size: 12px; letter-spacing: 0.1em; color: var(--wcwt-text-muted); text-transform: uppercase; margin-bottom: 7px; }

.wcwt-status-badge { font-size: 17px; font-weight: 800; letter-spacing: 0.06em; color: var(--wcwt-status-on); margin-bottom: 2px; }
.wcwt-status-badge.is-out   { color: var(--wcwt-status-out); }
.wcwt-status-badge.is-break { color: var(--wcwt-status-break); }

.wcwt-duration-row { font-size: 19px; font-weight: 600; color: var(--wcwt-text); margin: 5px 0 9px; font-variant-numeric: tabular-nums; }
.wcwt-duration-sep { color: var(--wcwt-text-dim); font-weight: 300; }
.wcwt-progress-track { height: 6px; background: var(--wcwt-progress-bg); border-radius: 3px; overflow: hidden; }
.wcwt-progress-fill { height: 100%; background: var(--wcwt-progress-fill); border-radius: 3px; transition: width 1s ease; box-shadow: 0 0 8px var(--wcwt-accent-glow); }

.wcwt-card-gauge { text-align: center; }
.wcwt-gauge-wrap { position: relative; width: 118px; height: 118px; margin: 0 auto 4px; }
.wcwt-gauge-wrap canvas { width: 118px !important; height: 118px !important; }
.wcwt-gauge-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
#wcwt-gauge-time { font-size: 14px; font-weight: 700; color: var(--wcwt-text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.wcwt-gauge-label small { font-size: 13px; color: var(--wcwt-text-muted); }
.wcwt-card-chart { display: flex; flex-direction: column; }
.wcwt-card-chart canvas { flex: 1; max-height: 155px; }
.wcwt-target-line { margin-top: 7px; font-size: 13px; letter-spacing: 0.05em; color: var(--wcwt-text-muted); text-transform: uppercase; }
.wcwt-target-line span { color: var(--wcwt-accent); font-weight: 700; }

/* -- Notifications ------------------------------------------------------------ */
.wcwt-notif-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.wcwt-notif-card { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--wcwt-notif-bg); border: 1px solid rgba(128,128,128,0.1); border-radius: 6px; }
.wcwt-notif-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.wcwt-notif-icon.type-success { background: rgba(0,200,100,0.12); color: #00c864; border: 1px solid rgba(0,200,100,0.25); }
.wcwt-notif-icon.type-warning { background: rgba(245,166,35,0.12); color: #f5a623; border: 1px solid rgba(245,166,35,0.25); }
.wcwt-notif-icon.type-error   { background: rgba(255,79,106,0.12); color: #ff4f6a; border: 1px solid rgba(255,79,106,0.25); }
.wcwt-notif-icon.type-info    { background: var(--wcwt-accent-dim); color: var(--wcwt-accent); border: 1px solid rgba(0,100,200,0.2); }
.wcwt-notif-text strong { display: block; font-size: 12px; font-weight: 600; color: var(--wcwt-text); margin-bottom: 2px; }
.wcwt-notif-text span { font-size: 13px; color: var(--wcwt-text-muted); line-height: 1.4; }
.wcwt-notif-placeholder { grid-column: 1/-1; text-align: center; color: var(--wcwt-text-dim); font-size: 12px; padding: 16px; }

/* Light mode notification icons */
.wcwt-terminal.wcwt-light .wcwt-notif-icon.type-success { color: #006633; }
.wcwt-terminal.wcwt-light .wcwt-notif-icon.type-info    { color: #0055aa; }

/* -- Login notice ------------------------------------------------------------- */
.wcwt-login-notice { text-align: center; padding: 24px; color: var(--wcwt-text-muted); }
.wcwt-login-notice a { color: var(--wcwt-accent); }

/* -- Responsive --------------------------------------------------------------- */
@media ( max-width: 900px ) {
    .wcwt-grid { grid-template-columns: 1fr; }
    .wcwt-left { border-right: none; border-bottom: 1px solid var(--wcwt-border-faint); }
    .wcwt-metrics-row, .wcwt-notif-grid { grid-template-columns: 1fr; }
    .wcwt-scale-slider { width: 60px; }
}

@media ( max-width: 480px ) {
    .wcwt-clock-time { font-size: 38px; }
    .wcwt-scale-wrap { display: none; }
}
