/* =============================================================
   OTU Services — Frontend CSS
   Brand palette: Maroon (#800020) | Gold (#D4AF37) | White (#fff)
   ============================================================= */

/* ---- Reset / Variables ---- */
:root {
    --otu-maroon: #800020;
    --otu-maroon-dark: #5a0018;
    --otu-gold: #D4AF37;
    --otu-gold-light: #f5e98a;
    --otu-white: #ffffff;
    --otu-light-bg: #f9f4f4;
    --otu-border: #e0d0d0;
    --otu-text: #333333;
    --otu-text-muted: #777777;
    --otu-success: #2e7d32;
    --otu-error: #c62828;
    --otu-radius: 6px;
    --otu-shadow: 0 2px 10px rgba(128,0,32,0.08);
    --otu-transition: 0.2s ease;
}

/* ============================================================
   Buttons
   ============================================================ */
.otu-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--otu-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--otu-transition), color var(--otu-transition), border-color var(--otu-transition);
    line-height: 1.4;
}

.otu-btn-primary {
    background: var(--otu-maroon);
    color: var(--otu-gold);
    border-color: var(--otu-maroon-dark);
}

.otu-btn-primary:hover,
.otu-btn-primary:focus {
    background: var(--otu-maroon-dark);
    color: var(--otu-white);
    text-decoration: none;
}

.otu-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.otu-btn-download {
    background: var(--otu-gold);
    color: #2c0000;
    border-color: #b8952e;
}

.otu-btn-download:hover {
    background: #b8952e;
    color: var(--otu-white);
}

/* ============================================================
   Messages
   ============================================================ */
.otu-message,
.otu-success-message,
.otu-error-message {
    padding: 14px 18px;
    border-radius: var(--otu-radius);
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.otu-success-message {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: var(--otu-success);
}

.otu-error-message {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: var(--otu-error);
}

/* ============================================================
   Loading Spinner
   ============================================================ */
.otu-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid var(--otu-border);
    border-top-color: var(--otu-maroon);
    border-radius: 50%;
    animation: otu-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

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

/* ============================================================
   Service Forms (LLC / EIN / Immigration)
   ============================================================ */
.otu-service-form {
    background: var(--otu-light-bg);
    border: 1px solid var(--otu-border);
    border-left: 4px solid var(--otu-maroon);
    border-radius: var(--otu-radius);
    padding: 24px;
    margin: 20px 0 28px;
}

.otu-form-title {
    color: var(--otu-maroon);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    padding: 0;
}

.otu-form-description {
    color: var(--otu-text-muted);
    font-size: 13px;
    margin: 0 0 18px;
}

.otu-form-row {
    margin-bottom: 16px;
}

.otu-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--otu-text);
    margin-bottom: 5px;
}

.otu-form-row input[type="text"],
.otu-form-row input[type="email"],
.otu-form-row input[type="tel"],
.otu-form-row input[type="date"],
.otu-form-row input[type="password"],
.otu-form-row select,
.otu-form-row textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--otu-border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--otu-text);
    background: var(--otu-white);
    box-sizing: border-box;
    transition: border-color var(--otu-transition), box-shadow var(--otu-transition);
}

.otu-form-row input:focus,
.otu-form-row select:focus,
.otu-form-row textarea:focus {
    border-color: var(--otu-maroon);
    box-shadow: 0 0 0 2px rgba(128,0,32,0.12);
    outline: none;
}

.otu-security-note {
    font-size: 12px;
    color: #555;
    margin: 5px 0 0;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 6px 10px;
}

.otu-lock-icon {
    margin-right: 4px;
}

.otu-field-error {
    display: block;
    color: var(--otu-error);
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

/* Service badges in cart */
.otu-service-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

.otu-badge-llc         { background: #800020; color: #D4AF37; }
.otu-badge-ein         { background: #1a237e; color: #fff176; }
.otu-badge-immigration { background: #004d40; color: #b2dfdb; }
.otu-badge-none        { color: #aaa; }

/* Service note on product page */
.otu-service-note {
    background: #f3fbe8;
    border: 1px solid #c8e6c9;
    border-left: 4px solid #388e3c;
    border-radius: var(--otu-radius);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    color: #1b5e20;
}

/* Thank you page */
.otu-thankyou-message {
    background: var(--otu-light-bg);
    border: 1px solid var(--otu-border);
    border-top: 4px solid var(--otu-gold);
    border-radius: var(--otu-radius);
    padding: 24px;
    margin: 24px 0;
}

.otu-thankyou-message h2 {
    color: var(--otu-maroon);
    margin-top: 0;
}

.otu-next-steps {
    padding-left: 20px;
    margin-bottom: 18px;
}

.otu-next-steps li {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--otu-text);
}

/* Order status */
.otu-order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.otu-status-processing, .otu-status-confirmed { background: #e8f5e9; color: #2e7d32; }
.otu-status-pending                           { background: #fff3e0; color: #e65100; }
.otu-status-completed                         { background: #e3f2fd; color: #1565c0; }
.otu-status-cancelled                         { background: #ffebee; color: #c62828; }
.otu-status-on-hold                           { background: #f3e5f5; color: #6a1b9a; }

/* ============================================================
   Booking Form
   ============================================================ */
.otu-booking-form-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.otu-booking-title {
    color: var(--otu-maroon);
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--otu-gold);
}

.otu-booking-form .otu-booking-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 8px;
}

/* ============================================================
   Dashboard — Layout & Tabs
   ============================================================ */
.otu-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.otu-dashboard-header {
    background: var(--otu-maroon);
    color: var(--otu-white);
    padding: 20px 28px;
    border-radius: var(--otu-radius) var(--otu-radius) 0 0;
    margin-bottom: 0;
}

.otu-dashboard-header h2 {
    margin: 0;
    color: var(--otu-gold);
    font-size: 22px;
}

.otu-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background: var(--otu-maroon-dark);
    padding: 0 8px;
    border-left: 1px solid var(--otu-maroon-dark);
    border-right: 1px solid var(--otu-maroon-dark);
}

.otu-tab {
    padding: 10px 18px;
    background: transparent;
    color: rgba(255,255,255,0.75);
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: color var(--otu-transition), border-color var(--otu-transition);
    white-space: nowrap;
}

.otu-tab:hover {
    color: var(--otu-gold);
}

.otu-tab-active {
    color: var(--otu-gold) !important;
    border-bottom-color: var(--otu-gold) !important;
    background: rgba(255,255,255,0.05);
}

.otu-tab-panels {
    border: 1px solid var(--otu-border);
    border-top: none;
    border-radius: 0 0 var(--otu-radius) var(--otu-radius);
    background: var(--otu-white);
}

.otu-tab-content {
    display: none;
    padding: 28px;
    animation: otu-tab-fade 0.2s ease;
}

.otu-tab-content-active {
    display: block;
}

@keyframes otu-tab-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Dashboard — Stats Grid (Overview)
   ============================================================ */
.otu-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.otu-stat-card {
    background: var(--otu-light-bg);
    border: 1px solid var(--otu-border);
    border-top: 4px solid var(--otu-maroon);
    border-radius: var(--otu-radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--otu-shadow);
}

.otu-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--otu-maroon);
    line-height: 1;
}

.otu-stat-label {
    display: block;
    font-size: 12px;
    color: var(--otu-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.otu-quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.otu-quick-links li {
    margin-bottom: 8px;
}

.otu-quick-links a {
    color: var(--otu-maroon);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.otu-quick-links a:hover {
    color: var(--otu-maroon-dark);
    text-decoration: underline;
}

/* ============================================================
   Dashboard — Data Tables
   ============================================================ */
.otu-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
}

.otu-data-table thead th {
    background: var(--otu-maroon);
    color: var(--otu-gold);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--otu-maroon-dark);
}

.otu-data-table tbody tr:nth-child(even) {
    background: var(--otu-light-bg);
}

.otu-data-table tbody tr:hover {
    background: #fff0f0;
}

.otu-data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--otu-border);
    color: var(--otu-text);
    vertical-align: middle;
}

.otu-no-data {
    color: var(--otu-text-muted);
    font-style: italic;
    padding: 12px 0;
}

/* ============================================================
   Dashboard — Course Cards
   ============================================================ */
.otu-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

.otu-course-card {
    background: var(--otu-white);
    border: 1px solid var(--otu-border);
    border-radius: var(--otu-radius);
    overflow: hidden;
    box-shadow: var(--otu-shadow);
    transition: box-shadow var(--otu-transition);
}

.otu-course-card:hover {
    box-shadow: 0 4px 18px rgba(128,0,32,0.14);
}

.otu-course-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.otu-course-info {
    padding: 14px;
}

.otu-course-info h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--otu-maroon);
}

/* ============================================================
   Progress Bar
   ============================================================ */
.otu-progress-bar-wrap {
    background: #e0d0d0;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.otu-progress-bar {
    background: linear-gradient(90deg, var(--otu-maroon) 0%, var(--otu-gold) 100%);
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
}

.otu-progress-label,
.otu-progress-percent {
    font-size: 12px;
    color: var(--otu-text-muted);
    margin: 4px 0;
}

.otu-lesson-progress {
    background: var(--otu-light-bg);
    border: 1px solid var(--otu-border);
    border-radius: var(--otu-radius);
    padding: 14px 18px;
    margin-top: 24px;
}

/* ============================================================
   Certificate Cards
   ============================================================ */
.otu-certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

.otu-certificate-card {
    background: var(--otu-white);
    border: 1px solid var(--otu-border);
    border-top: 5px solid var(--otu-maroon);
    border-radius: var(--otu-radius);
    box-shadow: var(--otu-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.otu-certificate-header {
    background: var(--otu-maroon);
    color: var(--otu-gold);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.otu-certificate-header h3,
.otu-certificate-header h4 {
    margin: 0;
    font-size: 15px;
    color: var(--otu-gold);
}

.otu-cert-icon {
    font-size: 22px;
}

.otu-certificate-id {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-top: 2px;
}

.otu-certificate-body {
    padding: 16px 18px;
    flex: 1;
}

.otu-cert-student {
    font-size: 17px;
    font-weight: 700;
    color: var(--otu-maroon);
    margin: 0 0 4px;
}

.otu-cert-course {
    font-size: 14px;
    color: var(--otu-text);
    margin: 0 0 6px;
}

.otu-cert-date {
    font-size: 13px;
    color: var(--otu-text-muted);
    margin: 0;
}

.otu-certificate-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--otu-border);
    background: var(--otu-light-bg);
}

.otu-cert-no-pdf {
    font-size: 13px;
    color: var(--otu-text-muted);
    font-style: italic;
    margin: 0;
}

/* ============================================================
   Dashboard — Profile Form
   ============================================================ */
.otu-profile-wrap {
    max-width: 500px;
}

.otu-profile-form h3 {
    color: var(--otu-maroon);
    border-bottom: 2px solid var(--otu-gold);
    padding-bottom: 6px;
    margin-bottom: 20px;
}

/* ============================================================
   Dashboard — Login Prompt
   ============================================================ */
.otu-dashboard-login {
    max-width: 420px;
    margin: 40px auto;
    background: var(--otu-white);
    border: 1px solid var(--otu-border);
    border-top: 5px solid var(--otu-maroon);
    border-radius: var(--otu-radius);
    padding: 28px 32px;
    box-shadow: var(--otu-shadow);
}

.otu-dashboard-login h2 {
    color: var(--otu-maroon);
    margin-top: 0;
    margin-bottom: 6px;
}

.otu-register-link {
    margin-top: 14px;
    font-size: 14px;
    text-align: center;
}

.otu-register-link a {
    color: var(--otu-maroon);
    font-weight: 600;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .otu-tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .otu-tab {
        padding: 10px 12px;
        font-size: 12px;
    }

    .otu-tab-content {
        padding: 18px;
    }

    .otu-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .otu-courses-grid,
    .otu-certificates-grid {
        grid-template-columns: 1fr;
    }

    .otu-data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .otu-service-form {
        padding: 16px;
    }

    .otu-booking-form-wrap {
        max-width: 100%;
    }
}
