/* ============================================
   IBO STREAMBOX - PREMIUM DESIGN V4
   Upgrade Completo - Layout Top Tier
   ============================================ */

:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #1e90ff;
    --accent: #00d4ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #00d4ff;
    
    --bg-dark: #0a0e27;
    --bg-darker: #050812;
    --bg-card: #141b2f;
    --bg-light: #1a2340;
    
    --text-primary: #f0f4f8;
    --text-secondary: #b0b8c8;
    --text-muted: #7a8290;
    
    --border: #1e293b;
    --border-light: #334155;
    
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

body[data-bs-theme="dark"] {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    box-shadow: var(--glow);
}

/* ============================================
   SIDEBAR
   ============================================ */

.app-sidebar {
    background: linear-gradient(180deg, #0f1629 0%, var(--bg-dark) 100%);
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

#kt_app_sidebar_header {
    border-bottom: 1px solid var(--border);
    background: rgba(0, 212, 255, 0.05);
    padding: 1.5rem !important;
}

#kt_app_sidebar_header img {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
    transition: all 0.3s ease;
}

#kt_app_sidebar_header img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.6));
}

.menu-item {
    margin-bottom: 6px;
}

.menu-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.3s ease;
}

.menu-link:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(4px);
    box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.1);
}

.menu-link:hover::before {
    left: 100%;
}

.menu-link.active {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15) 0%, rgba(58, 123, 213, 0.08) 100%);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.2), inset 0 0 12px rgba(0, 212, 255, 0.08);
}

.menu-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 3px 0 0 3px;
}

.menu-title {
    font-weight: 500;
    font-size: 0.93rem;
    color: inherit;
}

.menu-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.menu-sub-accordion {
    background: transparent;
    padding-left: 8px;
    margin-top: 4px;
    border-left: 2px solid rgba(0, 212, 255, 0.2);
    margin-left: 8px;
}

.menu-sub-accordion .menu-link {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
}

#kt_app_sidebar_footer {
    border-top: 1px solid var(--border);
    background: rgba(0, 212, 255, 0.03);
    padding: 1rem 1.5rem;
}

/* ============================================
   HEADER
   ============================================ */

.app-header {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 27, 47, 0.95) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.app-navbar-logo img {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.2));
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.user-name {
    font-weight: 600;
    color: #00d4ff;
    font-size: 0.95rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15), var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: rgba(0, 212, 255, 0.03);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-light {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: rgba(0, 212, 255, 0.1);
}

/* ============================================
   TABLES
   ============================================ */

.table {
    color: var(--text-primary);
    margin-bottom: 0;
}

.table thead th {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 212, 255, 0.03);
    padding: 1rem;
}

.table tbody td {
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 212, 255, 0.02);
}

/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-light-primary {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-light-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-light-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-light-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    background: rgba(0, 212, 255, 0.03);
}

.modal-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.btn-close {
    filter: invert(1);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.btn-close:hover {
    opacity: 1;
    filter: invert(1) brightness(1.2);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.app-blank {
    background: linear-gradient(135deg, #050812 0%, var(--bg-dark) 50%, #0f1629 100%);
    position: relative;
    overflow: hidden;
}

.app-blank::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.app-blank::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(58, 123, 213, 0.1) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

#kt_sign_in_form {
    background: rgba(20, 27, 47, 0.7);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 212, 255, 0.05);
    position: relative;
    z-index: 1;
}

#kt_sign_in_form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

#kt_sign_in_form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
    padding: 0.9rem 1.2rem;
    transition: all 0.3s ease;
}

#kt_sign_in_form .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

#kt_sign_in_form .form-control::placeholder {
    color: var(--text-muted);
}

/* ============================================
   STAT WIDGETS
   ============================================ */

.stat-widget {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(58, 123, 213, 0.05) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-widget:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-4px);
}

.stat-widget:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: 8px;
    border: 1px solid;
    padding: 1rem 1.2rem;
}

.alert-primary {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--primary);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-muted {
    color: var(--text-muted);
}

.bg-primary-light {
    background: rgba(0, 212, 255, 0.1);
}

.border-primary {
    border-color: var(--primary);
}

.glow {
    box-shadow: var(--glow);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .card {
        border-radius: 10px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        width: 100%;
    }
    
    #kt_sign_in_form {
        padding: 2rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}
