/* =============================================
   RakuNDEX — Ultra Modern Dark Theme
   ============================================= */

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

body {
    background: #000000;
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 68, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
    color: #e2e8f0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: rgba(5, 5, 15, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 136, 255, 0.15);
    box-shadow: 4px 0 30px rgba(0, 68, 255, 0.1);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* SIDEBAR BRAND - Logo alanı büyük */
.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(0, 136, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 68, 255, 0.03);
}

.sidebar-brand img {
    height: 80px !important;
    width: auto;
    max-width: 220px;
    filter: drop-shadow(0 0 20px rgba(0, 136, 255, 0.4));
    transition: filter 0.3s ease;
}

.sidebar-brand img:hover {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6));
}

/* SIDEBAR NAV */
.sidebar-nav {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav .nav-item { margin-bottom: 4px; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: rgba(0, 136, 255, 0.08);
    color: #00d4ff;
    border-color: rgba(0, 136, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 136, 255, 0.1);
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    background: rgba(0, 136, 255, 0.12);
    color: #00d4ff;
    border-color: rgba(0, 136, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 136, 255, 0.15), inset 0 0 20px rgba(0, 136, 255, 0.05);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(0, 136, 255, 0.1);
}

/* MAIN CONTENT */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */
.topbar {
    background: rgba(5, 5, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 136, 255, 0.1);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

.topbar-user .badge {
    background: rgba(0, 136, 255, 0.15) !important;
    border: 1px solid rgba(0, 136, 255, 0.3);
    color: #00d4ff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* CONTENT AREA */
.content-area {
    padding: 28px;
    flex: 1;
}

/* STAT CARDS */
.stat-card {
    background: rgba(5, 5, 20, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 136, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0088ff, #00d4ff, transparent);
    opacity: 0.6;
}

.stat-card:hover {
    border-color: rgba(0, 136, 255, 0.3);
    box-shadow: 0 8px 40px rgba(0, 68, 255, 0.2), 0 0 0 1px rgba(0, 136, 255, 0.1);
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin: 8px 0 4px;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

/* stat-total */
.stat-total {
    background: linear-gradient(135deg, rgba(0, 68, 255, 0.15), rgba(0, 68, 255, 0.05));
    border: 1px solid rgba(0, 68, 255, 0.25);
}
.stat-total .stat-icon { color: #0088ff; background: rgba(0, 68, 255, 0.1); }
.stat-total .stat-value { color: #4da6ff; }

/* stat-submitted */
.stat-submitted {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(124, 58, 237, 0.25);
}
.stat-submitted .stat-icon { color: #c4b5fd; background: rgba(124, 58, 237, 0.1); }
.stat-submitted .stat-value { color: #c4b5fd; }

/* stat-error */
.stat-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.stat-error .stat-icon { color: #f87171; background: rgba(239, 68, 68, 0.1); }
.stat-error .stat-value { color: #f87171; }

/* GLASS CARD */
.card-dark {
    background: rgba(5, 5, 20, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 136, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

.card-dark:hover {
    border-color: rgba(0, 136, 255, 0.2);
}

.card-dark-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 136, 255, 0.08);
    background: rgba(0, 68, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* TABLE */
.table-dark-custom {
    color: #e2e8f0;
    margin: 0;
}

.table-dark-custom thead th {
    background: rgba(0, 68, 255, 0.05);
    border-bottom: 1px solid rgba(0, 136, 255, 0.15);
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    font-weight: 600;
}

.table-dark-custom tbody td {
    border-bottom: 1px solid rgba(0, 136, 255, 0.05);
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 0.88rem;
}

.table-dark-custom tbody tr:hover td {
    background: rgba(0, 136, 255, 0.04);
}

/* FORM CONTROLS */
.form-control-dark {
    background: rgba(0, 0, 20, 0.8) !important;
    border: 1px solid rgba(0, 136, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    transition: all 0.2s ease !important;
}

.form-control-dark:focus {
    border-color: #0088ff !important;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15), 0 0 20px rgba(0, 136, 255, 0.1) !important;
    outline: none !important;
}

.form-control-dark::placeholder { color: #334155 !important; }

/* BUTTONS */
.btn-primary-glow {
    background: linear-gradient(135deg, #0044ff, #0088ff);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 68, 255, 0.4);
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 136, 255, 0.5);
    background: linear-gradient(135deg, #0055ff, #00aaff);
    color: white;
}

.btn-purple {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
    color: white;
}

.btn-outline-purple {
    background: transparent;
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: #c4b5fd;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-outline-purple:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.6);
    color: #c4b5fd;
}

/* Small action buttons */
.btn-xs {
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-index {
    background: rgba(0, 136, 255, 0.1);
    border: 1px solid rgba(0, 136, 255, 0.25);
    color: #60a5fa;
}

.btn-index:hover {
    background: rgba(0, 136, 255, 0.2);
    color: #93c5fd;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* NEON GLOW TEXT */
.neon-text {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* QUICK ACTION CARDS */
.quick-action-card {
    background: rgba(5, 5, 20, 0.7);
    border: 1px solid rgba(0, 136, 255, 0.1);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: #e2e8f0;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0088ff, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-card:hover {
    border-color: rgba(0, 136, 255, 0.4);
    box-shadow: 0 8px 40px rgba(0, 68, 255, 0.2);
    transform: translateY(-4px);
    color: #e2e8f0;
}

.quick-action-card:hover::before { opacity: 1; }

/* BOT LOG */
#botLog {
    background: #000000;
    border: 1px solid rgba(0, 136, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.8;
    max-height: 350px;
    overflow-y: auto;
    color: #00d4ff;
    height: 280px;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: rgba(0, 136, 255, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 136, 255, 0.5); }

/* STATUS BADGES */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.badge-submitted {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
}

.badge-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

/* URL LINK */
.url-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.88rem;
}

.url-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* SIDEBAR TOGGLE (mobile) */
.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
}

/* PROGRESS BAR */
.progress {
    background: rgba(0, 68, 255, 0.1);
    border-radius: 4px;
}

.progress-bar {
    background: linear-gradient(90deg, #0044ff, #00d4ff);
    transition: width 0.3s ease;
}

/* FORM CHECK (radio buttons) */
.form-check-input:checked {
    background-color: #0088ff;
    border-color: #0088ff;
}

.form-check-input {
    border-color: rgba(0, 136, 255, 0.3);
    background-color: transparent;
}

/* ALERT */
.alert-success-dark {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
    border-radius: 10px;
    padding: 12px 16px;
}

.alert-danger-dark {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    border-radius: 10px;
    padding: 12px 16px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: flex; align-items: center; }
    .content-area { padding: 16px; }
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    background-image:
        radial-gradient(ellipse at 30% 40%, rgba(0, 68, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(0, 212, 255, 0.08) 0%, transparent 40%);
}

.login-card {
    background: rgba(5, 5, 20, 0.9);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 136, 255, 0.1), 0 0 80px rgba(0, 68, 255, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 100px;
    filter: drop-shadow(0 0 30px rgba(0, 136, 255, 0.5));
}

/* AI Chat page specifics */
.chat-sessions-panel {
    background: rgba(5, 5, 15, 0.95) !important;
    border-right: 1px solid rgba(0, 136, 255, 0.15) !important;
}

.session-item {
    color: #64748b !important;
    border-radius: 8px;
}

.session-item:hover {
    background: rgba(0, 136, 255, 0.08) !important;
    color: #00d4ff !important;
}

.session-item.active {
    background: rgba(0, 136, 255, 0.12) !important;
    color: #00d4ff !important;
    border-left: 3px solid #0088ff !important;
}

/* WALLET / SETTINGS card overrides */
.card {
    background: rgba(5, 5, 20, 0.7) !important;
    border: 1px solid rgba(0, 136, 255, 0.1) !important;
    border-radius: 16px !important;
    color: #e2e8f0 !important;
}

.card-header {
    background: rgba(0, 68, 255, 0.05) !important;
    border-bottom: 1px solid rgba(0, 136, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    background: transparent !important;
}

/* Form labels and inputs for wallet/settings */
.form-label { color: #94a3b8; font-size: 0.875rem; font-weight: 500; }

.form-control {
    background: rgba(0, 0, 20, 0.8) !important;
    border: 1px solid rgba(0, 136, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 10px !important;
}

.form-control:focus {
    border-color: #0088ff !important;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15) !important;
    background: rgba(0, 0, 20, 0.9) !important;
    color: #e2e8f0 !important;
}

.form-control::placeholder { color: #334155 !important; }

.form-select {
    background-color: rgba(0, 0, 20, 0.8) !important;
    border: 1px solid rgba(0, 136, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 10px !important;
}

.form-select:focus {
    border-color: #0088ff !important;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15) !important;
}

/* Table overrides for Bootstrap tables inside cards */
.table {
    color: #e2e8f0;
}

.table th {
    border-bottom: 1px solid rgba(0, 136, 255, 0.15);
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 68, 255, 0.05);
}

.table td {
    border-bottom: 1px solid rgba(0, 136, 255, 0.05);
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 68, 255, 0.03) !important;
    color: #e2e8f0;
}

/* Badge overrides */
.badge.bg-warning { background: rgba(251, 191, 36, 0.2) !important; color: #fbbf24 !important; }
.badge.bg-success { background: rgba(52, 211, 153, 0.2) !important; color: #34d399 !important; }
.badge.bg-danger  { background: rgba(248, 113, 113, 0.2) !important; color: #f87171 !important; }
.badge.bg-info    { background: rgba(0, 136, 255, 0.2) !important;   color: #60a5fa !important; }

/* Text utilities override */
.text-muted { color: #475569 !important; }
.text-secondary { color: #64748b !important; }
