/* ══════════════════════════════════════════════════════
   IKSMC Portal – Global Custom Styles
   Applied to ALL admin & member pages via adminlte.php
   ══════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────── */
:root {
    --g-dark:   #1b5e20;
    --g-mid:    #2e7d32;
    --g-soft:   #388e3c;
    --g-light:  #a5d6a7;
    --g-pale:   rgba(165, 214, 167, 0.35);
    --g-border: rgba(129, 199, 132, 0.55);
    --radius:   14px;
    --shadow:   0 4px 20px rgba(27, 94, 32, 0.09);
}

/* ── Sidebar Background ──────────────────────────────── */
.main-sidebar,
.sidebar,
.os-viewport {
    background: linear-gradient(180deg, #1b5e20 0%, #2e7d32 60%, #388e3c 100%) !important;
}

/* ── Brand / Logo Bar ───────────────────────────────── */
.brand-link {
    background: rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid rgba(165, 214, 167, 0.3) !important;
    color: #fff !important;
}

.brand-link:hover {
    background: rgba(0, 0, 0, 0.25) !important;
    color: #fff !important;
}

.brand-text {
    color: #fff !important;
    font-weight: 800 !important;
}

/* ── Sidebar User Panel ─────────────────────────────── */
.sidebar .user-panel {
    border-bottom: 1px solid rgba(165, 214, 167, 0.3) !important;
    padding: 12px 15px;
}

.sidebar .user-panel .info a {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 600;
}

/* ── Sidebar Search ─────────────────────────────────── */
.sidebar-search .input-group .form-control {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(165,214,167,0.3) !important;
    color: #fff !important;
}

.sidebar-search .input-group .form-control::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

.sidebar-search .input-group-text {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(165,214,167,0.3) !important;
    color: #a5d6a7 !important;
}

/* ── Section Headers ────────────────────────────────── */
.nav-sidebar .nav-header {
    color: #a5d6a7 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.1em !important;
    padding: 10px 20px 4px !important;
    margin-top: 6px;
    opacity: 1 !important;
}

/* ── Nav Links (default state) ──────────────────────── */
.nav-sidebar .nav-item > .nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 500 !important;
    font-size: 0.875rem;
    margin: 2px 10px !important;
    padding: 9px 14px !important;
    border-radius: 10px !important;
    transition: all 0.25s ease !important;
    display: flex;
    align-items: center;
}

.nav-sidebar .nav-item > .nav-link .nav-icon {
    color: #a5d6a7 !important;
    transition: transform 0.25s ease;
    font-size: 1rem !important;
    margin-right: 10px !important;
    width: 1.25rem;
    text-align: center;
}

/* ── Nav Links (hover state) ────────────────────────── */
.nav-sidebar .nav-item > .nav-link:hover,
.nav-sidebar .nav-item > .nav-link:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    transform: translateX(4px);
    text-decoration: none;
}

.nav-sidebar .nav-item > .nav-link:hover .nav-icon {
    color: #fff !important;
    transform: scale(1.15);
}

/* ── Nav Links (active state) ───────────────────────── */
.nav-sidebar .nav-item > .nav-link.active {
    background: #fff !important;
    color: #1b5e20 !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
}

.nav-sidebar .nav-item > .nav-link.active .nav-icon {
    color: #2e7d32 !important;
}

/* ── Submenu / Tree ─────────────────────────────────── */
.nav-sidebar .nav-treeview {
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px;
    margin: 2px 10px;
    padding: 4px 0;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link {
    margin: 1px 6px !important;
    padding: 8px 12px !important;
    font-size: 0.83rem;
    border-radius: 8px !important;
    color: rgba(255,255,255,0.75) !important;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link:hover {
    background: rgba(255,255,255,0.10) !important;
    color: #fff !important;
    transform: translateX(3px);
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

/* ── Treeview parent arrow ──────────────────────────── */
.nav-sidebar .nav-item > .nav-link > .right,
.nav-sidebar .nav-item > .nav-link > .fas.fa-angle-left {
    color: rgba(255,255,255,0.5) !important;
}

/* ══════════════════════════════════════════════════════
   TOP HEADER / NAVBAR
   ══════════════════════════════════════════════════════ */
.main-header.navbar {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%) !important;
    border-bottom: none !important;
    box-shadow: 0 3px 16px rgba(27, 94, 32, 0.35) !important;
    min-height: 56px;
}

/* Sidebar toggle icon */
.main-header .nav-link[data-widget="pushmenu"],
.sidebar-toggle {
    color: rgba(255,255,255,0.9) !important;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.main-header .nav-link[data-widget="pushmenu"]:hover,
.sidebar-toggle:hover {
    color: #fff !important;
}

/* All header nav links */
.main-header .navbar-nav .nav-link,
.main-header .nav-link {
    color: rgba(255,255,255,0.88) !important;
    transition: all 0.2s;
}

.main-header .navbar-nav .nav-link:hover,
.main-header .nav-link:hover {
    color: #fff !important;
    text-decoration: none;
}

/* Header breadcrumb / page title area */
.content-header h1 {
    color: #1b5e20 !important;
}
.breadcrumb-item a { color: #2e7d32 !important; }
.breadcrumb-item.active { color: #388e3c !important; }

/* Header dropdown badge */
.main-header .badge-danger { background: #ef5350 !important; }

/* User dropdown in header */
.main-header .dropdown-menu {
    border: 1px solid var(--g-border) !important;
    box-shadow: 0 8px 24px rgba(27,94,32,0.15) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.main-header .dropdown-item {
    color: var(--g-dark) !important;
    font-weight: 500;
    padding: 9px 20px;
    transition: background 0.2s;
}

.main-header .dropdown-item:hover,
.main-header .dropdown-item:focus {
    background: var(--g-pale) !important;
    color: var(--g-dark) !important;
}

/* Fullscreen & other icon buttons */
.main-header .nav-link[data-widget="fullscreen"] i,
.main-header .nav-link[data-widget="control-sidebar"] i {
    color: rgba(255,255,255,0.9) !important;
}

/* Search box in header */
.main-header .navbar-search-block {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%) !important;
}
.main-header .navbar-search-block .form-control {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(165,214,167,0.4) !important;
    color: #fff !important;
    border-radius: 20px;
}
.main-header .navbar-search-block .form-control::placeholder {
    color: rgba(255,255,255,0.55) !important;
}
.main-header .navbar-search-block .btn {
    color: rgba(255,255,255,0.9) !important;
}

/* ══════════════════════════════════════════════════════
   MAIN FOOTER
   ══════════════════════════════════════════════════════ */
.main-footer {
    background: rgba(232, 245, 233, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 2px solid rgba(129, 199, 132, 0.5) !important;
    color: #1b5e20 !important;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 12px 22px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.main-footer strong {
    color: #1b5e20 !important;
    font-weight: 800;
}

.main-footer a {
    color: #2e7d32 !important;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.main-footer a:hover {
    color: #1b5e20 !important;
    text-decoration: underline;
}

/* Right side version text */
.main-footer .float-right,
.main-footer > span:last-child {
    color: #388e3c !important;
    font-size: 0.78rem;
    font-weight: 400;
    float: none !important;
}

/* ══════════════════════════════════════════════════════
   GLOBAL CARDS – Pale Green Glassmorphism
   ══════════════════════════════════════════════════════ */
.card {
    background: rgba(232, 245, 233, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(129, 199, 132, 0.45) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(27, 94, 32, 0.08) !important;
    color: #1b5e20 !important;
}

.card .card-header {
    background: rgba(165, 214, 167, 0.3) !important;
    border-bottom: 1px solid rgba(129, 199, 132, 0.4) !important;
    color: #1b5e20 !important;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 14px 14px 0 0 !important;
}

.card .card-title {
    color: #1b5e20 !important;
    font-weight: 800;
}

.card .card-body {
    color: #2e7d32 !important;
}

.card .card-footer {
    background: rgba(165, 214, 167, 0.2) !important;
    border-top: 1px solid rgba(129, 199, 132, 0.35) !important;
    color: #1b5e20 !important;
    border-radius: 0 0 14px 14px !important;
}

/* Tables inside cards */
.card table th {
    color: #1b5e20 !important;
    font-weight: 700;
    border-bottom-color: rgba(129, 199, 132, 0.5) !important;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card table td {
    color: #2e7d32 !important;
    border-bottom-color: rgba(165, 214, 167, 0.35) !important;
}

.card table tbody tr:hover {
    background: rgba(165, 214, 167, 0.15) !important;
}

/* Labels and small text inside cards */
.card label,
.card .text-muted {
    color: #388e3c !important;
    font-weight: 600;
}

/* Form controls inside cards */
.card .form-control {
    background: rgba(255,255,255,0.75) !important;
    border: 1.5px solid rgba(129, 199, 132, 0.5) !important;
    color: #1b5e20 !important;
    border-radius: 8px !important;
}

.card .form-control:focus {
    border-color: #2e7d32 !important;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15) !important;
    background: #fff !important;
}

/* ── Sidebar Toggle Button ──────────────────────────── */
.sidebar-toggle {
    color: rgba(255,255,255,0.9) !important;
}

/* ── Scrollbar (sidebar) ────────────────────────────── */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(165,214,167,0.4); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(165,214,167,0.7); }

