/* MODERN UI MAKE-OVER (TAILWIND-LIKE STYLE) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --bg-body: #f8fafc;
    --surface: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
    font-size: 14px;
    line-height: 1.6;
}

/* NAVBAR TRANSFORMATION */
.navbar-inverse {
    background-color: var(--nav-bg) !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: 70px;
    position: relative;
    z-index: 1050 !important;
    /* Higher than everything else */
}

.navbar-inverse .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-inverse .navbar-nav>li>a {
    color: #475569 !important;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin: 0 2px;
}

.navbar-inverse .navbar-nav>li>a:hover {
    color: var(--primary) !important;
    background: rgba(79, 70, 229, 0.05) !important;
}

.navbar-inverse .navbar-nav>.active>a {
    background-color: rgba(79, 70, 229, 0.1) !important;
    color: var(--primary) !important;
    font-weight: 700;
}

/* COMPONENT CARDS - ELEGANT STYLE */
/* COMPONENT CARDS - ELEGANT STYLE */
.panel,
.well,
.card,
.post.text {
    background: var(--surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 30px !important;
    margin-bottom: 30px !important;
    margin-top: 30px !important;
    position: relative;
    z-index: 1;
    /* Lower than navbar */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover,
.card:hover,
.post.text:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px);
}

/* SPECIFIC ALERT FIX - NO "DOUBLE CARD" LOOK */
.alert {
    border-radius: var(--radius-md) !important;
    padding: 15px 25px !important;
    margin-bottom: 25px !important;
    border: none !important;
    /* No Border */
    position: relative;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    /* Flat look */
    box-shadow: none !important;
}

/* Success Alert (Search/List Header) - Clean Green */
.alert-success {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-left: 4px solid #10b981 !important;
    /* Left accent only */
}

/* Info Alert */
.alert-info {
    background: #eff6ff !important;
    color: #1e40af !important;
    border-left: 4px solid #3b82f6 !important;
}

/* Warning Alert */
.alert-warning {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-left: 4px solid #f59e0b !important;
}

/* Danger Alert */
.alert-danger {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-left: 4px solid #ef4444 !important;
}

/* CARD HEADERS - CLEAN & ELEGANT OVERRIDE */
.card-header,
.panel-heading,
.alert {
    background: #ffffff !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    font-weight: 700 !important;
    padding: 20px 30px !important;
    letter-spacing: 0em;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Remove gradient/color overrides */
.panel-primary>.panel-heading,
.panel-green>.panel-heading,
.panel-yellow>.panel-heading,
.panel-red>.panel-heading,
.bg-primary,
.bg-success,
.bg-danger,
.bg-warning,
.bg-info {
    background: #ffffff !important;
    color: var(--text-main) !important;
    border-color: transparent !important;
}

/* Add a subtle accent line instead */
.card-header::after,
.panel-heading::after {
    content: '';
    position: absolute;
    left: 30px;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px 10px 0 0;
}

/* DASHBOARD WIDGETS - FLAT UI (Reference Match) */
.widget-card {
    border-radius: 8px !important;
    /* Slightly sharper corner like image */
    color: #fff !important;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Very subtle shadow */
    transition: transform 0.2s;
    overflow: hidden;
}

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Specific Flat Colors */
.bg-flat-blue {
    background-color: #64b5f6 !important;
}

/* Soft Blue */
.bg-flat-mint {
    background-color: #4db6ac !important;
}

/* Soft Teal/Mint */
.bg-flat-orange {
    background-color: #ffb74d !important;
}

/* Soft Orange */
.bg-flat-pink {
    background-color: #f06292 !important;
}

/* Soft Pink */

/* Widget Internal Layout */
.widget-title {
    font-size: 14px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.widget-number {
    font-size: 42px !important;
    /* Big Number */
    font-weight: 700;
    line-height: 1;
}

/* Footer Section */
.widget-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
    margin-top: 10px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

.widget-footer span {
    font-weight: 500;
}

/* Overwrite generic card body for widgets */
.widget-card .card-body {
    padding: 20px !important;
}

/* Reset Icons sizes for this layout */
.widget-card .bi {
    font-size: 2.5rem !important;
    opacity: 0.8;
}

/* ALERTS - Subtle Standard */
.alert-info {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

/* Dashboard Panels - Keep specific colors for icons only if needed, but headers stay white */
.panel-green {
    border-color: transparent !important;
}

.panel-yellow {
    border-color: transparent !important;
}

.panel-red {
    border-color: transparent !important;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6,
.title {
    color: var(--text-main) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
}

.title {
    font-size: 26px !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding-bottom: 15px !important;
    background: none !important;
}

/* BUTTONS - PRECISE & CLEAN */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning,
.btn-info,
.btn-success {
    border-radius: 6px !important;
    /* Back to Standard */
    padding: 8px 18px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border: 1px solid transparent !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s;
    color: #fff !important;
    text-transform: none !important;
    /* Remove uppercase force */
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* FIX: btn-link must have color, not white */
.btn-link {
    color: var(--primary) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.btn-link:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

/* Primary - Bright Blue (Save Changes) */
.btn-primary,
.btn-outline-primary {
    background-color: #0d6efd !important;
    /* Bootstrap Blue */
    border-color: #0d6efd !important;
    color: white !important;
}

.btn-primary:hover,
.btn-outline-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

/* Danger - Red (Delete) */
.btn-danger,
.btn-outline-danger {
    background-color: #dc3545 !important;
    /* Bootstrap Red */
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-danger:hover,
.btn-outline-danger:hover {
    background-color: #bb2d3b !important;
    border-color: #b02a37 !important;
}

/* Secondary Actions (Close/Cancel) - Grey */
.btn-secondary,
.btn-outline-secondary,
.btn-default {
    background-color: #6c757d !important;
    /* Bootstrap Grey */
    border-color: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover,
.btn-outline-secondary:hover:hover {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
}

/* Other Colors - All Solid */
.btn-success,
.btn-outline-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-warning,
.btn-outline-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

/* Yellow exception for text */
.btn-info,
.btn-outline-info {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #000 !important;
}

/* Override btn-group specifics from previous edits if any exist */
.btn-group .btn {
    margin: 0 2px;
}

/* FORMS */
background-color: #fff !important;
border: 1px solid var(--border-color) !important;
border-radius: var(--radius-md) !important;
padding: 10px 15px !important;
/* Reduced from 14px for more compact look */
font-size: 14px !important;
transition: all 0.2s;
box-shadow: var(--shadow-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
}

/* BOLD PROFESSIONAL THEME */

/* 1. Breaking White Dominance */
.card-header,
.panel-heading {
    background: #1e293b !important;
    /* DARK NAVY */
    color: #fff !important;
    border-bottom: none !important;
    padding: 15px 25px !important;
    border-radius: 12px 12px 0 0 !important;
}

/* 2. Fixing "Double Table" (Card Flush) */
.card .table-responsive {
    margin: 0 !important;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* TABLES - MODERN FLAT ACADEMIC */
.table {
    margin-bottom: 0 !important;
    border: 1px solid #e2e8f0 !important;
    /* Soft outer border */
    border-radius: 12px;
    /* Rounded corners */
    overflow: hidden;
    /* Clip corners */
}

/* Override table-bordered harsh lines */
.table-bordered {
    border: 1px solid #e2e8f0 !important;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e2e8f0 !important;
    /* Soft grey grid */
}

.table thead th {
    background-color: #f8fafc !important;
    /* Very Light Grey */
    color: #475569 !important;
    /* Slate Text */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #cbd5e1 !important;
    padding: 16px 20px !important;
}

/* First/Last Header Radius for "Card" feel inside tables */
.table thead th:first-child {
    border-radius: 0;
}

.table thead th:last-child {
    border-radius: 0 12px 12px 0;
}

.table tbody td {
    padding: 20px 20px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    font-size: 14px;
    background: #fff;
    vertical-align: middle !important;
}

.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #fff !important;
}

.table-striped tbody tr:nth-of-type(even) td {
    background-color: #f8fafc !important;
    /* Very subtle zebra */
}

.table-hover tbody tr:hover td {
    background-color: #fff7ed !important;
    /* Very subtle Warm tint to differentiate from blue header */
    color: #000 !important;
}

/* 3. Precision Buttons (Compact & Sharp) */
.btn-sm {
    padding: 6px 14px !important;
    font-size: 12px !important;
    height: 32px;
    /* Fixed height for alignment */
}

/* Action Groups - Presisi */
.text-center .btn-group {
    display: inline-flex;
    gap: 5px;
    /* Separate buttons slightly */
    box-shadow: none !important;
}

.text-center .btn {
    margin: 0 !important;
    /* Remove legacy margins */
}

/* SPACERS & UTILS */
.row {
    margin-left: -15px;
    margin-right: -15px;
    margin-bottom: 25px;
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-md-12 {
    padding: 0 15px;
    margin-bottom: 20px;
}

/* DROPDOWN & NAVBAR FIXES - CRITICAL */
.dropdown-menu {
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px !important;
    margin-top: 10px !important;
    z-index: 1051 !important;
    /* Higher than navbar */
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 10px 15px;
    font-weight: 500;
    color: var(--text-main);
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.dropdown-menu.show {
    display: block !important;
}

/* IMAGE FIXES */
.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    margin: 0 auto 20px;
    display: block;
    object-fit: cover;
}

/* CONTAINER */
.container {
    max-width: 1280px !important;
}

/* ICONS */
.bi {
    margin-right: 6px;
    font-size: 1.1em;
    vertical-align: -0.15em;
}

/* MODAL Z-INDEX FIXES (Prevents "Freeze") */
.modal {
    z-index: 1060 !important;
    /* Must be higher than navbar */
}

.modal-backdrop {
    z-index: 1050 !important;
    /* Standard backdrop level */
}

.modal-dialog {
    z-index: 1070 !important;
    /* Content highest */
}

/* FOOTER */
footer {
    background: #fff !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: 80px !important;
    padding: 40px 0 !important;
    color: var(--text-muted);
}

.footer {
    font-weight: 500;
}