/* Axiom Distributed AI - Enhanced Dark Theme */

/* ===== Base Styles ===== */
body {
    color: #e0e0e0;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h4 { color: #a8c8ff; }

/* ===== Links ===== */
a:not(.btn) {
    color: #64b5f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover:not(.btn) {
    color: #90caf9;
    text-shadow: 0 0 8px rgba(100, 181, 246, 0.4);
}

a:visited:not(.btn) { color: #7986cb; }

/* ===== Navbar ===== */
.navbar, .navbar-default {
    background: linear-gradient(135deg, rgba(30, 40, 60, 0.95) 0%, rgba(20, 30, 50, 0.98) 100%) !important;
    border: none !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.navbar-brand, .navbar-default .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.4em;
}

.navbar-nav > li > a {
    color: #c0c8d0 !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 4px 2px;
}

.navbar-nav > li > a:hover { 
    color: #ffffff !important;
    background: rgba(100, 181, 246, 0.15) !important;
}

/* ===== Panels/Cards ===== */
.panel {
    background: linear-gradient(145deg, rgba(40, 50, 70, 0.9) 0%, rgba(25, 35, 55, 0.95) 100%);
    border: 1px solid rgba(100, 120, 150, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.panel-heading, .panel-default > .panel-heading {
    background: linear-gradient(135deg, rgba(60, 80, 110, 0.8) 0%, rgba(40, 55, 80, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(100, 140, 180, 0.2);
    color: #ffffff !important;
    font-weight: 600;
    padding: 15px 20px;
}

.panel-title { color: #ffffff !important; font-weight: 600; }
.panel-body { padding: 20px; color: #d0d8e0; }

/* ===== Buttons ===== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.2s ease;
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-default {
    background: linear-gradient(135deg, #455a64 0%, #37474f 100%);
    color: #ffffff;
}

/* ===== Tables ===== */
.table { background: rgba(30, 40, 60, 0.5); border-radius: 8px; }

.table > thead > tr > th {
    background: rgba(50, 65, 90, 0.8);
    color: #a8c8ff;
    font-weight: 600;
    border-bottom: 2px solid rgba(100, 140, 180, 0.3);
    padding: 12px 15px;
}

.table > tbody > tr > td {
    border-color: rgba(100, 120, 150, 0.15);
    padding: 12px 15px;
}

.table > tbody > tr:hover > td { background: rgba(100, 181, 246, 0.08); }
.table-striped > tbody > tr:nth-of-type(odd) { background: rgba(40, 50, 70, 0.4); }

/* ===== Forms ===== */
.form-control {
    background: rgba(30, 40, 55, 0.8);
    border: 1px solid rgba(100, 120, 150, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    padding: 10px 15px;
}

.form-control:focus {
    background: rgba(35, 45, 60, 0.9);
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}

/* ===== Code Blocks ===== */
pre, code {
    background: rgba(20, 25, 35, 0.9);
    color: #a8d8a8;
    border: 1px solid rgba(100, 120, 150, 0.2);
    border-radius: 6px;
}
code { padding: 2px 8px; }
pre { padding: 15px 20px; }

/* ===== HR ===== */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 140, 180, 0.4), transparent);
}

/* ===== Blockquote ===== */
blockquote {
    border-left: 4px solid #64b5f6;
    background: rgba(100, 181, 246, 0.08);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

/* ===== Dropdown ===== */
.dropdown-menu {
    background: rgba(30, 40, 55, 0.98);
    border: 1px solid rgba(100, 120, 150, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dropdown-menu > li > a { color: #c8d0d8 !important; padding: 10px 20px; }
.dropdown-menu > li > a:hover { background: rgba(100, 181, 246, 0.15) !important; color: #fff !important; }

/* ===== Alerts ===== */
.alert { border-radius: 10px; border: none; padding: 15px 20px; }
.alert-success { background: rgba(67, 160, 71, 0.2); color: #a5d6a7; border-left: 4px solid #4caf50; }
.alert-info { background: rgba(33, 150, 243, 0.2); color: #90caf9; border-left: 4px solid #2196f3; }
.alert-warning { background: rgba(255, 167, 38, 0.2); color: #ffcc80; border-left: 4px solid #ff9800; }
.alert-danger { background: rgba(244, 67, 54, 0.2); color: #ef9a9a; border-left: 4px solid #f44336; }

/* ===== Progress Bar ===== */
.progress {
    background: rgba(30, 40, 55, 0.8);
    border-radius: 10px;
    height: 12px;
}
.progress-bar { background: linear-gradient(90deg, #1976d2, #42a5f5); border-radius: 10px; }

/* ===== Well ===== */
.well {
    background: rgba(35, 45, 65, 0.8);
    border: 1px solid rgba(100, 120, 150, 0.2);
    border-radius: 10px;
}

/* ===== Misc ===== */
.select2-container { color: #000; }
img.icon { padding: 3px; background-color: rgba(200, 210, 220, 0.9); border-radius: 4px; }
.credit { color: #ffd54f; font-weight: 600; }

/* ===== Banner Enhancement ===== */
img.img-responsive[src*="water"] {
    border-radius: 0 0 20px 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.4);
}


/* ===== Form Input Dark Mode Fix ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
    background: rgba(30, 40, 55, 0.9) !important;
    border: 1px solid rgba(100, 120, 150, 0.4) !important;
    border-radius: 8px !important;
    color: #e0e0e0 !important;
    padding: 10px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    background: rgba(35, 45, 60, 0.95) !important;
    border-color: #64b5f6 !important;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.25) !important;
    outline: none !important;
    color: #ffffff !important;
}

input::placeholder,
textarea::placeholder {
    color: #707880 !important;
}

/* ===== Checkbox and Radio Styling ===== */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #64b5f6;
}

/* ===== Select Dropdown ===== */
select option {
    background: #2a3548;
    color: #e0e0e0;
}

/* ===== Pagination ===== */
.pagination > li > a,
.pagination > li > span {
    background: rgba(40, 50, 70, 0.8);
    border-color: rgba(100, 120, 150, 0.3);
    color: #90caf9;
}

.pagination > li > a:hover {
    background: rgba(100, 181, 246, 0.2);
    border-color: rgba(100, 181, 246, 0.4);
}

.pagination > .active > a {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border-color: #1976d2;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    background: rgba(35, 45, 65, 0.6);
    border-radius: 8px;
    padding: 12px 20px;
}

.breadcrumb > li + li:before {
    color: #607080;
}

/* ===== Modal ===== */
.modal-content {
    background: linear-gradient(145deg, rgba(40, 50, 70, 0.98) 0%, rgba(25, 35, 55, 0.99) 100%);
    border: 1px solid rgba(100, 120, 150, 0.3);
    border-radius: 12px;
}

.modal-header {
    border-bottom-color: rgba(100, 120, 150, 0.2);
}

.modal-footer {
    border-top-color: rgba(100, 120, 150, 0.2);
}

/* ===== Tooltip ===== */
.tooltip-inner {
    background: rgba(30, 40, 55, 0.95);
    border-radius: 6px;
    padding: 8px 12px;
}

/* ===== User Avatar Enhancement ===== */
.avatar, img[src*="avatar"], img[src*="profile"] {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===== Status Labels ===== */
.label-success, td:contains("Running") {
    background: linear-gradient(135deg, #00c853 0%, #00a843 100%) !important;
    color: #fff !important;
}

/* ===== Credit Display ===== */
td[align="right"], .text-right {
    font-variant-numeric: tabular-nums;
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Print Styles ===== */
@media print {
    body { background: white !important; color: black !important; }
    .navbar, footer { display: none !important; }
}


/* ===== Force Dark Form Inputs ===== */
.form-control,
form input,
form textarea,
form select,
input.form-control,
textarea.form-control,
select.form-control,
.input-group input,
#main input[type="text"],
#main input[type="email"],
#main input[type="password"] {
    background-color: rgba(30, 40, 55, 0.9) !important;
    background: rgba(30, 40, 55, 0.9) !important;
    border: 1px solid rgba(100, 120, 150, 0.4) !important;
    border-radius: 8px !important;
    color: #e0e0e0 !important;
    -webkit-text-fill-color: #e0e0e0 !important;
}

.form-control:focus,
form input:focus,
form textarea:focus {
    background-color: rgba(35, 45, 60, 0.95) !important;
    background: rgba(35, 45, 60, 0.95) !important;
    border-color: #64b5f6 !important;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.25) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Override autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(30, 40, 55, 0.95) inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    caret-color: #e0e0e0 !important;
}

/* ===== User Home Page Cards ===== */
.row .col-sm-6 .panel,
.row .col-md-6 .panel {
    min-height: 200px;
}

/* ===== Certificate Page ===== */
.certificate {
    background: linear-gradient(145deg, rgba(50, 60, 80, 0.9), rgba(35, 45, 65, 0.95));
    border: 2px solid rgba(100, 140, 180, 0.3);
    border-radius: 15px;
    padding: 30px;
}

/* ===== Stats Bars (tasks) ===== */
.bar {
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    border-radius: 4px;
}

/* ===== Footer Enhancement ===== */
footer, .footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 120, 150, 0.2);
}

/* ===== Page Title Enhancement ===== */
h1, h2.page-title {
    background: linear-gradient(90deg, #ffffff, #a8c8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* ===== News Items ===== */
.news_item {
    border-left: 3px solid #64b5f6;
    padding-left: 15px;
    margin-bottom: 20px;
}

.news_title {
    color: #a8c8ff;
    font-weight: 600;
}

.news_date {
    color: #808890;
    font-size: 0.9em;
}

/* ===== Thread/Forum Enhancement ===== */
.thread, .forum-thread {
    border-radius: 8px;
    margin-bottom: 15px;
}

.post {
    background: rgba(35, 45, 60, 0.6);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.post:hover {
    background: rgba(40, 50, 70, 0.7);
}

/* ===== Admin/Mod buttons styling ===== */
.btn-warning {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.btn-info {
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
}

/* ===== Banner Image Enhancement ===== */
img.img-responsive[src*="water"],
img[src*="water.jpg"] {
    position: relative;
    filter: brightness(0.4) saturate(0.7);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}

/* Container for banner with overlay */
.container-fluid:has(img[src*="water"]),
div:has(> img[src*="water"]) {
    position: relative;
}

/* Alternative: hide the water banner entirely and use CSS gradient */
.banner-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a3a 100%);
}
