:root {
    --stc-primary: #DB3D6D;
    --stc-primary-hover: #0A558C;
    --stc-danger: #DB3D6D;
    --stc-danger-hover: #0A558C;
    --stc-title-color: #0A558C;
    --stc-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --stc-card-bg: rgba(255, 255, 255, 0.9);
    --stc-card-border: rgba(255, 255, 255, 0.5);
    --stc-text-main: #1e293b;
    --stc-text-muted: #64748b;
    --stc-input-bg: #ffffff;
    --stc-output-bg: #f0fdf4;
    --stc-output-text: #166534;
    --stc-output-border: #bbf7d0;
    --stc-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --stc-bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        --stc-card-bg: rgba(30, 41, 59, 0.95);
        --stc-text-main: #f1f5f9;
        --stc-text-muted: #94a3b8;
        --stc-input-bg: #0f172a;
        --stc-output-bg: #064e3b;
        --stc-output-text: #d1fae5;
        --stc-output-border: rgba(52, 211, 153, 0.2);
    }
}

.stc-wrapper {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    padding: 1rem;
    background: var(--stc-bg-gradient);
    border-radius: 20px;
    margin: 1rem auto;
    max-width: 850px;
    width: 100%;
}

.stc-wrapper * {
    box-sizing: border-box;
}

.stc-card {
    background: var(--stc-card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--stc-shadow);
    border: 1px solid var(--stc-card-border);
}

.stc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stc-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: var(--stc-title-color);
    letter-spacing: -0.01em;
}

.stc-header-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

@media (min-width: 600px) {
    .stc-header-actions {
        width: auto;
    }
}

.stc-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stc-control-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stc-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--stc-text-muted);
    text-transform: uppercase;
    text-align: center;
}

.stc-btn {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stc-btn:hover {
    background: var(--stc-primary-hover) !important;
    color: #ffffff !important;
    border-color: var(--stc-primary-hover) !important;
    transform: translateY(-1px);
}

.stc-btn-primary { background: var(--stc-primary); color: #fff; }
.stc-btn-secondary { background: #DB3D6D; color: #fff; border: 1px solid var(--stc-card-border); }
.stc-btn-danger { background: var(--stc-danger); color: #fff; }

.stc-btn-large { padding: 0.8rem 1.2rem; font-size: 0.95rem; }
.stc-btn-icon { width: 32px; height: 32px; padding: 0; }

.stc-grid-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 40px;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--stc-card-border);
}

.stc-col-header {
    font-weight: 700;
    color: var(--stc-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    text-align: center;
}

.stc-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 40px;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.stc-weekly-day {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
    border-radius: 12px;
}

.stc-day-title {
    font-weight: 700;
    color: var(--stc-primary);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    text-align: center;
}

.stc-day-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stc-input,
.stc-output {
    width: 100%;
    height: 42px;
    padding: 0 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid var(--stc-card-border);
    border-radius: 8px;
    outline: none;
    background: var(--stc-input-bg);
    color: var(--stc-text-main);
    font-weight: 600;
    font-family: inherit;
}

.stc-input:focus { border-color: var(--stc-primary); }
.stc-output { background: var(--stc-output-bg); border-color: var(--stc-output-border); color: var(--stc-output-text); }
.stc-output-grand { font-size: 1.1rem; height: 48px; }

.stc-checkbox { width: 20px; height: 20px; cursor: pointer; accent-color: var(--stc-primary); }

.stc-actions-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--stc-card-border);
    flex-wrap: wrap;
}

.stc-total-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stc-total-label { font-weight: 800; font-size: 0.9rem; color: var(--stc-text-main); width: 100%; text-align: center; }

.stc-total-val-hmin, .stc-total-val-dec { width: 100%; max-width: 150px; }

.stc-master-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (min-width: 480px) {
    .stc-total-label { width: auto; text-align: left; }
    .stc-total-val-hmin, .stc-total-val-dec { width: 120px; }
    .stc-actions-row { justify-content: space-between; }
}

@media (max-width: 600px) {
    .stc-grid-header { display: none; }
    .stc-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "start end" "hmin dec" "check check";
        background: var(--stc-card-bg);
        padding: 0.75rem;
        border-radius: 8px;
        border: 1px solid var(--stc-card-border);
        gap: 0.5rem;
    }
    .stc-time-start { grid-area: start; }
    .stc-time-end { grid-area: end; }
    .stc-out-hmin { grid-area: hmin; }
    .stc-out-dec { grid-area: dec; }
    .stc-col-check { grid-area: check; display: flex; justify-content: center; border-top: 1px solid var(--stc-card-border); padding-top: 0.5rem; }
}

@media (max-width: 350px) {
    .stc-title { font-size: 1.1rem; text-align: center; width: 100%; }
    .stc-btn { width: 100%; font-size: 0.8rem; padding: 0.5rem; }
    .stc-row { grid-template-columns: 1fr; grid-template-areas: "start" "end" "hmin" "dec" "check"; }
    .stc-card { padding: 1rem; }
    .stc-weekly-day { padding: 0.5rem; }
}

/* Print Styles */
@media print {
    .stc-btn, .stc-actions-row, .stc-master-actions, .stc-day-actions, .stc-header-actions, .stc-controls {
        display: none !important;
    }
}
