:root {
    --primary-orange: #ff6a00;
    --primary-hover: #e55e00;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --error-color: #dc3545;
    --success-color: #28a745;
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}
.hidden { display: none !important; }

/* HEADER */
.main-header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
    letter-spacing: 1px;
}

/* LAYOUT */
.container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}
.auth-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}
.auth-card h2 {
    font-size: 1.75rem;
    margin-bottom: 5px;
    text-align: center;
}
.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* FORMS */
.form-group { margin-bottom: 20px; }
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.instruction {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-top: -5px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fafafa;
}
input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
    background-color: #fff;
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrapper input { padding-left: 45px; }
.input-icon {
    position: absolute;
    left: 15px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}
.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed var(--primary-orange);
    border-radius: var(--border-radius);
    background-color: #fff5f0;
    cursor: pointer;
}

/* BUTTONS */
.primary-btn {
    width: 100%;
    background-color: var(--primary-orange);
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.primary-btn:hover:not(:disabled) { background-color: var(--primary-hover); }
.primary-btn:disabled {
    background-color: #ffa466;
    cursor: not-allowed;
}

/* PAYMENT NOTICE */
.payment-notice {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 30px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.notice-icon {
    color: #856404;
    width: 24px;
    flex-shrink: 0;
}
.notice-text {
    color: #856404;
    font-size: 0.95rem;
}

/* SPINNER / LOADER */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* PAGE LOADER */
.page-loader {
    text-align: center;
    padding: 50px 0;
}
.page-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 106, 0, 0.2);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    animation: slideUp 0.3s ease-out forwards;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary-orange);
    color: #fff;
}
.modal-header h3 { font-size: 1.1rem; }
.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}
.modal-body { padding: 20px; font-size: 1rem; }
.modal-footer { padding: 15px 20px; border-top: 1px solid var(--border-color); }
.error-details {
    margin-top: 15px;
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.error-details pre { white-space: pre-wrap; word-break: break-all; margin-top: 5px; }

/* PROGRESS BAR */
.progress-text { margin-bottom: 5px; font-weight: bold; color: var(--primary-orange); }
.progress-bar { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.progress-fill { width: 50%; height: 100%; background: var(--primary-orange); animation: progressAnim 2s infinite linear; }
@keyframes progressAnim { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

/* RESPONSIVE */
@media (max-width: 480px) {
    .container { padding: 0 15px; margin: 20px auto; }
    .auth-card { padding: 20px; }
    .header-title { font-size: 1.2rem; }
}
