/* ============================================
   CIX Orbit Academy - Main Stylesheet
   Learn. Build. Automate. Grow.
   ============================================ */

:root {
    --primary: #000000;
    --secondary: #ff6b00;
    --accent: #00ff41;
    --bg: #0a0a0a;
    --surface: #1a1a1a;
    --surface-2: #222222;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
    --border: #333333;
    --success: #00ff41;
    --danger: #ff4444;
    --warning: #ffaa00;
    --info: #00aaff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --transition: all 0.3s ease;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 4px; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ============ BUTTONS ============ */
.btn-cix {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border: none; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.95rem; cursor: pointer;
    transition: var(--transition); text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-cix-primary { background: var(--secondary); color: #fff; }
.btn-cix-primary:hover { background: #e65c00; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(255,107,0,0.4); color: #fff; }
.btn-cix-accent { background: var(--accent); color: #000; }
.btn-cix-accent:hover { background: #00cc33; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,255,65,0.4); color: #000; }
.btn-cix-outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-cix-outline:hover { background: var(--secondary); color: #fff; }
.btn-cix-danger { background: var(--danger); color: #fff; }
.btn-cix-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-cix-lg { padding: 16px 40px; font-size: 1.1rem; }

/* ============ CARDS ============ */
.card-cix {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    transition: var(--transition);
}
.card-cix:hover { border-color: var(--secondary); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-cix-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.card-cix-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--surface-2); color: var(--secondary); }

/* ============ KPI CARDS ============ */
.kpi-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    transition: var(--transition);
}
.kpi-card:hover { border-color: var(--secondary); box-shadow: var(--shadow); }
.kpi-icon { width: 60px; height: 60px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.kpi-icon.orange { background: rgba(255,107,0,0.15); color: var(--secondary); }
.kpi-icon.green { background: rgba(0,255,65,0.15); color: var(--accent); }
.kpi-icon.blue { background: rgba(0,170,255,0.15); color: var(--info); }
.kpi-icon.red { background: rgba(255,68,68,0.15); color: var(--danger); }
.kpi-icon.yellow { background: rgba(255,170,0,0.15); color: var(--warning); }
.kpi-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* ============ NAVBAR ============ */
.navbar-cix {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0.75rem 0; position: sticky; top: 0; z-index: 1000;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.navbar-cix .nav-brand { font-size: 1.3rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 10px; }
.navbar-cix .nav-brand .brand-accent { color: var(--secondary); }
.navbar-cix .nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.navbar-cix .nav-links a { color: var(--text-secondary); font-weight: 500; transition: var(--transition); }
.navbar-cix .nav-links a:hover, .navbar-cix .nav-links a.active { color: var(--secondary); }

/* ============ SIDEBAR ============ */
.sidebar-cix {
    width: 260px; min-height: 100vh; background: var(--surface);
    border-right: 1px solid var(--border); position: fixed; top: 0; left: 0;
    z-index: 1040; overflow-y: auto; transition: var(--transition);
}
.sidebar-cix .sidebar-brand { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.sidebar-cix .sidebar-brand h5 { margin: 0; font-weight: 800; font-size: 1.1rem; }
.sidebar-cix .sidebar-brand small { color: var(--text-secondary); font-size: 0.7rem; display: block; }
.sidebar-nav { padding: 0.5rem 0; list-style: none; margin: 0; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: 12px; padding: 0.7rem 1.25rem;
    color: var(--text-secondary); font-size: 0.9rem; transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-nav li a:hover { background: var(--surface-2); color: var(--text); }
.sidebar-nav li a.active { background: rgba(255,107,0,0.1); color: var(--secondary); border-left-color: var(--secondary); }
.sidebar-nav li a i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-nav .nav-section { padding: 1rem 1.25rem 0.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 700; }
.sidebar-nav .badge-cix { font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; background: var(--secondary); color: #fff; margin-left: auto; }

/* ============ MAIN CONTENT ============ */
.main-content { margin-left: 260px; min-height: 100vh; padding: 1.5rem 2rem; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.top-bar h4 { margin: 0; }

/* ============ TABLES ============ */
.table-cix { width: 100%; border-collapse: collapse; }
.table-cix th { background: var(--surface-2); color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.75rem 1rem; text-align: left; border-bottom: 2px solid var(--border); font-weight: 700; }
.table-cix td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
.table-cix tr:hover { background: rgba(255,107,0,0.05); }

/* ============ FORMS ============ */
.form-control-cix {
    width: 100%; padding: 10px 14px; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 0.95rem; transition: var(--transition);
}
.form-control-cix:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(255,107,0,0.15); }
.form-control-cix::placeholder { color: var(--text-secondary); }
.form-label-cix { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.form-group-cix { margin-bottom: 1rem; }
select.form-control-cix { appearance: auto; }
textarea.form-control-cix { min-height: 100px; resize: vertical; }

/* ============ BADGES ============ */
.badge-cix {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pending { background: rgba(255,170,0,0.15); color: var(--warning); }
.badge-active, .badge-approved, .badge-issued, .badge-completed, .badge-passed { background: rgba(0,255,65,0.15); color: var(--accent); }
.badge-rejected, .badge-failed { background: rgba(255,68,68,0.15); color: var(--danger); }
.badge-submitted, .badge-in_progress, .badge-under_review { background: rgba(0,170,255,0.15); color: var(--info); }
.badge-open { background: rgba(0,170,255,0.15); color: var(--info); }
.badge-resolved, .badge-closed { background: rgba(0,255,65,0.15); color: var(--accent); }

/* ============ PROGRESS ============ */
.progress-cix {
    width: 100%; height: 8px; background: var(--surface-2);
    border-radius: 4px; overflow: hidden;
}
.progress-cix-bar { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.progress-cix-bar.orange { background: var(--secondary); }
.progress-cix-bar.green { background: var(--accent); }
.progress-cix-bar.blue { background: var(--info); }

/* ============ HERO ============ */
.hero-cix {
    padding: 5rem 0 4rem; text-align: center; position: relative;
    background: linear-gradient(135deg, var(--bg) 0%, #111 50%, #1a0a00 100%);
    overflow: hidden;
}
.hero-cix::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,107,0,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(0,255,65,0.05) 0%, transparent 50%);
}
.hero-cix .hero-content { position: relative; z-index: 1; }
.hero-cix h1 { font-size: 3.5rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-cix h1 .gradient-text { background: linear-gradient(135deg, var(--secondary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-cix p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem; }
.hero-circuit { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.03; background-image: repeating-linear-gradient(0deg, transparent, transparent 50px, var(--secondary) 50px, var(--secondary) 51px), repeating-linear-gradient(90deg, transparent, transparent 50px, var(--secondary) 50px, var(--secondary) 51px); }

/* ============ FEATURES ============ */
.features-section { padding: 5rem 0; }
.feature-card { text-align: center; padding: 2rem; }
.feature-card .feature-icon { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 1.2rem; background: rgba(255,107,0,0.1); color: var(--secondary); border: 2px solid rgba(255,107,0,0.2); }
.feature-card h5 { margin-bottom: 0.75rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============ COURSE CARDS ============ */
.course-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: var(--transition);
    height: 100%; display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-5px); border-color: var(--secondary); box-shadow: var(--shadow-lg); }
.course-card .course-thumb { height: 180px; background: linear-gradient(135deg, var(--surface-2), var(--surface)); display: flex; align-items: center; justify-content: center; color: var(--secondary); font-size: 3rem; position: relative; }
.course-card .course-thumb .course-level { position: absolute; top: 12px; right: 12px; background: var(--secondary); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.course-card .course-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.course-card .course-body h5 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.course-card .course-body p { color: var(--text-secondary); font-size: 0.85rem; flex: 1; }
.course-card .course-meta { display: flex; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-secondary); }
.course-card .course-meta i { color: var(--secondary); }

/* ============ PRICING ============ */
.pricing-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; text-align: center;
    transition: var(--transition); position: relative; height: 100%; display: flex; flex-direction: column;
}
.pricing-card.featured { border-color: var(--secondary); }
.pricing-card.featured::before { content: 'POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--secondary); color: #fff; padding: 4px 20px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pricing-card .price { font-size: 2.5rem; font-weight: 900; color: var(--secondary); margin: 1rem 0; }
.pricing-card .price small { font-size: 0.9rem; color: var(--text-secondary); font-weight: 400; }
.pricing-card ul { list-style: none; text-align: left; padding: 0; margin: 1.5rem 0; }
.pricing-card ul li { padding: 0.5rem 0; color: var(--text-secondary); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.pricing-card ul li i { color: var(--accent); font-size: 0.8rem; }
.pricing-card .btn-cix { width: 100%; }

/* ============ PUBLIC FOOTER ============ */
.footer-cix { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-cix a { color: var(--text-secondary); }
.footer-cix a:hover { color: var(--secondary); }
.footer-cix .footer-brand { font-size: 1.2rem; font-weight: 800; color: var(--text); margin-bottom: 1rem; }
.footer-cix p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-copyright { text-align: center; padding: 1.5rem 0; border-top: 1px solid var(--border); margin-top: 2rem; font-size: 0.85rem; color: var(--text-secondary); }

/* ============ LESSON VIEW ============ */
.lesson-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.lesson-content h2 { color: var(--text); margin-bottom: 1rem; }
.lesson-content p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.8; }

/* ============ TEST VIEW ============ */
.test-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; position: sticky; top: 60px; z-index: 100; }
.test-timer { font-size: 1.5rem; font-weight: 800; color: var(--secondary); font-family: var(--font-mono); }
.test-timer.warning { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.question-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.question-card .question-number { color: var(--secondary); font-weight: 700; margin-bottom: 0.5rem; }
.option-label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; transition: var(--transition); }
.option-label:hover { border-color: var(--secondary); background: rgba(255,107,0,0.05); }
.option-label input:checked + span { color: var(--secondary); font-weight: 600; }
.option-label input { accent-color: var(--secondary); }

/* ============ CERTIFICATE ============ */
.certificate-card { background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%); border: 3px solid var(--secondary); border-radius: var(--radius); padding: 3rem; text-align: center; color: #000; max-width: 700px; margin: 2rem auto; position: relative; }
.certificate-card::before { content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 1px solid var(--accent); border-radius: 8px; pointer-events: none; }
.certificate-card .cert-header { margin-bottom: 2rem; }
.certificate-card .cert-body { margin: 2rem 0; }
.certificate-card .cert-name { font-size: 2rem; font-weight: 900; color: var(--secondary); margin: 1rem 0; }
.certificate-card .cert-course { font-size: 1.3rem; font-weight: 600; }
.certificate-card .cert-footer { display: flex; justify-content: space-around; margin-top: 2rem; padding-top: 1rem; border-top: 2px solid #eee; }

/* ============ LOGIN ============ */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-card .auth-brand { text-align: center; margin-bottom: 2rem; }
.auth-card .auth-brand h2 { font-weight: 800; }
.auth-card .auth-brand p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============ ALERTS ============ */
.alert-cix { padding: 1rem 1.5rem; border-radius: var(--radius-sm); margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.alert-cix-success { background: rgba(0,255,65,0.1); border: 1px solid rgba(0,255,65,0.3); color: var(--accent); }
.alert-cix-error { background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.3); color: var(--danger); }
.alert-cix-info { background: rgba(0,170,255,0.1); border: 1px solid rgba(0,170,255,0.3); color: var(--info); }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 4rem; color: var(--border); margin-bottom: 1rem; }
.empty-state h5 { color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============ PAGINATION ============ */
.pagination-cix { display: flex; gap: 4px; justify-content: center; margin-top: 1.5rem; }
.pagination-cix a, .pagination-cix span { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; }
.pagination-cix a { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.pagination-cix a:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.pagination-cix .active { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.pagination-cix .disabled { opacity: 0.5; pointer-events: none; }

/* ============ WHATSAPP BUTTON ============ */
.whatsapp-float { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 20px rgba(37,211,102,0.4); z-index: 9999; transition: var(--transition); }
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

/* ============ LOADING ============ */
.spinner-cix { width: 40px; height: 40px; border: 4px solid var(--border); border-top-color: var(--secondary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
    .sidebar-cix { transform: translateX(-100%); }
    .sidebar-cix.show { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1rem; }
    .hero-cix h1 { font-size: 2.2rem; }
    .kpi-card { padding: 1rem; }
    .kpi-value { font-size: 1.4rem; }
}
@media (max-width: 768px) {
    .hero-cix h1 { font-size: 1.8rem; }
    .hero-cix p { font-size: 1rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .top-bar { flex-direction: column; align-items: flex-start; }
}

/* ============ MISC ============ */
.text-secondary { color: var(--text-secondary) !important; }
.text-orange { color: var(--secondary) !important; }
.text-green { color: var(--accent) !important; }
.bg-orange { background: rgba(255,107,0,0.1) !important; }
.bg-green { background: rgba(0,255,65,0.1) !important; }
.glow-orange { box-shadow: 0 0 20px rgba(255,107,0,0.3); }
.glow-green { box-shadow: 0 0 20px rgba(0,255,65,0.3); }
.border-orange { border-color: var(--secondary) !important; }
.border-green { border-color: var(--accent) !important; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
