:root {
    --dwk-color-bg: #f8fafc;
    --dwk-color-surface: #ffffff;
    --dwk-color-text: #0f172a;
    --dwk-color-muted: #64748b;
    --dwk-color-primary: #27ae60;
    --dwk-color-primary-dark: #1e824c;
    --dwk-color-secondary: #2563eb;
    --dwk-color-accent: #d97706;
    --dwk-color-danger: #dc2626;
    --dwk-border-color: #e2e8f0;
    --dwk-font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --dwk-radius: 8px;
    --dwk-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--dwk-color-bg);
    color: var(--dwk-color-text);
    font-family: var(--dwk-font-base);
}

.sccf-app-shell {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.06);
}

.sccf-app-topbar {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sccf-app-topbar h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sccf-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #1e293b;
    color: #94a3b8;
}

.sccf-sync-pill.online {
    background: #14532d;
    color: #86efac;
}

.sccf-sync-pill.offline {
    background: #7f1d1d;
    color: #fca5a5;
}

.sccf-sync-pill.syncing {
    background: #78350f;
    color: #fde68a;
}

.sccf-app-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.sccf-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 10px;
}

.sccf-hub-card {
    background: #ffffff;
    border: 1px solid var(--dwk-border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--dwk-shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.sccf-hub-card:active {
    transform: scale(0.98);
}

.sccf-hub-card.card-sccf {
    border-left: 6px solid var(--dwk-color-primary);
}

.sccf-hub-card.card-dpp {
    border-left: 6px solid var(--dwk-color-secondary);
}

.sccf-hub-card h2 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sccf-hub-card p {
    margin: 0;
    font-size: 13px;
    color: var(--dwk-color-muted);
    line-height: 1.4;
}

.sccf-card-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.sccf-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    cursor: pointer;
    min-height: 52px;
}

.sccf-quick-action:active {
    background: #e2e8f0;
}

.sccf-form-card {
    background: #ffffff;
    border: 1px solid var(--dwk-border-color);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--dwk-shadow);
}

.sccf-form-card h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.sccf-field {
    margin-bottom: 14px;
}

.sccf-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.sccf-input, .sccf-select, .sccf-textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
}

.sccf-input:focus, .sccf-select:focus, .sccf-textarea:focus {
    outline: none;
    border-color: var(--dwk-color-primary);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.sccf-btn-primary {
    width: 100%;
    min-height: 50px;
    background: var(--dwk-color-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sccf-btn-primary:active {
    background: var(--dwk-color-primary-dark);
}

.sccf-btn-secondary {
    width: 100%;
    min-height: 44px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.sccf-signature-box {
    border: 1.5px dashed #94a3b8;
    border-radius: 6px;
    background: #f8fafc;
    position: relative;
    touch-action: none;
}

.sccf-signature-canvas {
    width: 100%;
    height: 180px;
    display: block;
}

.sccf-signature-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.sccf-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    max-width: 90%;
    text-align: center;
}
