/* Shadcn UI Variables & Globals */
:root {
    --st-background: #ffffff;
    --st-foreground: #09090b;
    --st-muted: #71717a;
    --st-muted-bg: #f4f4f5;
    --st-border: #e4e4e7;
    --st-primary: #CB8B02;
    --st-primary-foreground: #fafafa;
    --st-ring: #a1a1aa;
    --st-destructive: #ef4444;
}

.st-container {
    max-width: 650px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--st-foreground);
    box-sizing: border-box;
}

.st-card {
    background-color: var(--st-background);
    border: 1px solid var(--st-border);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.st-mt-6 { margin-top: 1.5rem; }

.st-card-header { padding: 1.5rem; border-bottom: 1px solid var(--st-border); }
.st-card-content { padding: 1.5rem; }
.st-card-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--st-border); background: var(--st-muted-bg); }

.st-flex-row { display: flex; justify-content: space-between; align-items: center; }

.st-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ecfdf5;
    color: #065f46;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.st-badge-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: stPulse 1.5s infinite;
}

.st-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem 0; letter-spacing: -0.025em; }
.st-title-sm { font-size: 1.125rem; font-weight: 600; margin: 0; }
.st-subtitle { font-size: 0.875rem; color: var(--st-muted); margin: 0; }
.st-subtitle-sm { font-size: 0.85rem; font-weight: 500; margin: 0 0 0.5rem 0; color: var(--st-muted); }

.st-input-group { margin-bottom: 1.25rem; }
.st-input-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.st-input-group input {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--st-border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.st-input-group input:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.1);
}

/* Primary Button with Loading States */
.st-btn-primary {
    width: 100%;
    height: 2.5rem;
    background: var(--st-primary);
    color: var(--st-primary-foreground);
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.st-btn-primary:hover { background: #27272a; }
.st-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.st-btn-outline {
    background: #09090b;
    border: 1px solid var(--st-border);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.st-btn-outline:hover { background: var(--st-muted-bg); }

.st-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--st-primary-foreground);
    border-radius: 50%;
    border-top-color: transparent;
    animation: stSpin 0.6s linear infinite;
}

.is-loading .st-btn-text { display: none; }
.is-loading .st-spinner { display: inline-block; }

.st-alert-destructive {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--st-destructive);
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Sharing buttons */
.st-share-actions { display: flex; gap: 0.75rem; }
.st-btn-share {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem;
    border-radius: 0.375rem;
    color: white;
}
.st-btn-share.st-wa { background: #25d366; }
.st-btn-share.st-fb { background: #1877f2; }

/* Result Table Grid */
.st-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: var(--st-muted-bg);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.st-data-item h5 { margin: 0 0 0.25rem 0; font-size: 0.75rem; color: var(--st-muted); font-weight: 500; text-transform: uppercase; }
.st-data-item p { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--st-foreground); }

@keyframes stPulse { 50% { opacity: 0.5; } }
@keyframes stSpin { to { transform: rotate(360deg); } }

/* Mobile View Responsiveness */
@media (max-width: 640px) {
    .st-container { padding: 1rem; margin: 0; }
    .st-result-grid { grid-template-columns: 1fr; }
}

/* Print Specific Utility CSS */
@media print {
    body * { visibility: hidden; }
    #st-print-area, #st-print-area * { visibility: visible; }
    #st-print-area { position: absolute; left: 0; top: 0; width: 100%; }
}