* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f4fd 0%, #d6eaf8 50%, #ebdef0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 520px;
    width: 100%;
    padding: 36px 32px;
}

.dashboard-card {
    max-width: 580px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.success-logo {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

h1 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

/* Steps */
.steps {
    background: #f0f7ff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: #34495e;
}

.step-num {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Section Labels */
.section-label {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 12px;
    margin-top: 4px;
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 6px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #3498db;
}

.hint {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 6px;
}

.err {
    display: none;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
}

/* Sheet Guide */
.sheet-guide {
    background: #fafbfc;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 16px;
    font-size: 13px;
    color: #34495e;
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-email {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    margin: 8px 0;
    text-align: center;
    font-weight: 600;
}

.sheet-url-example {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 11px;
    margin-top: 8px;
    word-break: break-all;
    color: #6c757d;
}

.sheet-url-example .highlight {
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 700;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    display: block;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    margin-top: 12px;
    font-size: 14px;
    padding: 12px;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 24px 0;
}

/* Footer Note */
.note {
    text-align: center;
    font-size: 12px;
    color: #95a5a6;
    margin-top: 12px;
}

/* Links */
.link {
    color: #1a73e8;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Info Box (Dashboard) */
.info-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 600;
}

.info-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

/* Sync Controls */
.sync-controls {
    margin-bottom: 20px;
}

.sync-controls .input-group {
    margin-bottom: 12px;
}

/* Status Box */
.status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f7ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #b8daff;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#statusText {
    font-size: 14px;
    color: #004085;
}

/* Result Boxes */
.result-box {
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.success-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-box {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Date Mode Toggle */
.date-mode-toggle {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #34495e;
    cursor: pointer;
    font-weight: 600;
}

.radio-label input[type="radio"] {
    accent-color: #3498db;
}

#successText {
    white-space: pre-line;
}

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.orders-table th {
    background: #34495e;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.orders-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.orders-table tr:hover {
    background: #f5f7fa;
}

.orders-table tr:nth-child(even) {
    background: #fafbfc;
}

.orders-table tr:nth-child(even):hover {
    background: #f0f2f5;
}

/* Responsive */
@media (max-width: 560px) {
    .card {
        padding: 24px 18px;
    }

    h1 {
        font-size: 19px;
    }

    .btn {
        font-size: 15px;
    }
}
