:root {
    --primary-color: #bd7c36;
    --primary-hover: #a66b2d;
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

@media (max-width: 768px) {
    body { font-size: 14px; }
}

.app-header {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px var(--shadow-color);
}

@media (max-width: 768px) {
    .app-header { padding: 1rem; }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    h1 { font-size: 1.2rem; }
}

#app {
    max-width: 480px;
    margin: 2rem auto;
    padding: 0;
}

@media (max-width: 768px) {
    #app { margin: 1rem; }
}

.auth-container {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

@media (max-width: 768px) {
    .auth-container { padding: 1.5rem; }
}

.auth-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .auth-logo { width: 80px; margin-bottom: 1rem; }
}

h2 {
    margin: 0 0 0.5rem;
    color: #333;
}

.subtitle {
    margin: 0 0 1.5rem;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-group { text-align: left; }

label {
    display: block;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.4rem;
}

.auth-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.otp-input {
    letter-spacing: 0.6em;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
}

.auth-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-button:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.link-button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    margin-top: 1.25rem;
    padding: 0;
}

.link-button:hover { color: var(--primary-hover); }

.loader {
    animation: spin 1s linear infinite;
    font-size: 1rem;
    display: inline-block;
}

.spinner-large {
    font-size: 2rem;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin: 1rem 0;
}

.hidden { display: none !important; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-message {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

.status-message.error { color: #e53935; }

.status-message.success { color: #43a047; font-weight: 500; }

/* Account / context summary */
.account-summary {
    background: #faf5ee;
    border: 1px solid #efe0cc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.account-summary .name {
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem;
}

.account-summary .expiry {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.account-summary .expiry.urgent { color: #e53935; font-weight: 600; }

/* Plan list */
.plan-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.plan-card {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.plan-card:hover { border-color: var(--primary-color); }

.plan-card.selected {
    border-color: var(--primary-color);
    background-color: #faf5ee;
}

.plan-card .plan-title {
    font-weight: 600;
    color: #333;
    margin: 0 0 0.2rem;
}

.plan-card .plan-interval {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

.plan-card .plan-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.fineprint {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: #999;
    line-height: 1.4;
}

.success-icon { font-size: 3rem; margin-bottom: 0.5rem; }

/* Sections (subscription / add-ons) */
.section { text-align: left; margin-bottom: 1.5rem; }

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.pill {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* Add-on cards (also reused for the "active subscription" row) */
.addon-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.addon-info { flex: 1; min-width: 0; }

.addon-name { font-weight: 600; color: #333; margin: 0 0 0.2rem; }

.addon-desc {
    font-size: 0.82rem;
    color: #777;
    margin: 0 0 0.3rem;
    line-height: 1.35;
}

.addon-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.addon-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.btn-small {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-small:hover:not(:disabled) { background-color: var(--primary-hover); }

.btn-small:disabled { opacity: 0.7; cursor: not-allowed; }
