/* ============================================================
   style.css — Custom Modern UI
   Project: PT Berkah Cipta Anugerah (BCA)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ────────────────────────────────────────────────────────────
   1. GLOBAL
──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body,
.content-wrapper,
.nav-sidebar .nav-link,
.card,
input, button, select, textarea {
    font-family: 'Inter', 'Source Sans Pro', sans-serif !important;
}

:root {
    --primary:        #4f46e5;
    --primary-dark:   #3730a3;
    --primary-light:  #e0e7ff;
    --secondary:      #7c3aed;
    --success:        #059669;
    --warning:        #d97706;
    --danger:         #dc2626;
    --info:           #0284c7;
    --sidebar-bg:     #0f172a;
    --sidebar-hover:  rgba(255,255,255,.08);
    --sidebar-active: rgba(99,102,241,.25);
    --body-bg:        #f1f5f9;
    --card-shadow:    0 4px 24px rgba(0,0,0,.07);
    --radius:         14px;
    --radius-sm:      10px;
}


/* ────────────────────────────────────────────────────────────
   2. LOGIN PAGE  (form centered, Bootstrap-based)
──────────────────────────────────────────────────────────── */

/* Full-page gradient background */
.lp-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 40%, #4338ca 70%, #6d28d9 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative blobs */
.lp-body::before {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    top: -200px; right: -150px;
    pointer-events: none;
}
.lp-body::after {
    content: '';
    position: fixed;
    width: 450px; height: 450px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    bottom: -150px; left: -100px;
    pointer-events: none;
}

/* Wrapper centers the card */
.lp-wrapper {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

/* The card itself */
.lp-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    padding: 2.5rem 2.75rem;
}

/* Logo & brand */
.lp-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}
.lp-logo-img {
    height: 64px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}
.lp-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: .25rem;
}
.lp-brand-sub {
    font-size: .825rem;
    color: #64748b;
    font-weight: 400;
}

/* Divider */
.lp-divider {
    height: 1px;
    background: #f1f5f9;
    margin-bottom: 1.75rem;
}

/* Label */
.lp-label {
    font-size: .8375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

/* Input group */
.lp-input-group .input-group-prepend .lp-input-prepend,
.lp-input-group .input-group-append .lp-pw-toggle {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #94a3b8 !important;
    font-size: .875rem;
}
.lp-input-group .input-group-prepend .lp-input-prepend {
    border-right: none !important;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}
.lp-input-group .input-group-append .lp-pw-toggle {
    border-left: none !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    cursor: pointer;
    transition: color .2s, background .2s;
}
.lp-input-group .input-group-append .lp-pw-toggle:hover {
    color: var(--primary) !important;
    background: var(--primary-light) !important;
}

.lp-input {
    border: 1.5px solid #e2e8f0 !important;
    border-left: none !important;
    border-radius: 0 !important;
    background: #f8fafc !important;
    font-size: .9375rem !important;
    color: #0f172a !important;
    padding: .75rem 1rem !important;
    transition: border-color .2s, box-shadow .2s, background .2s !important;
    height: auto !important;
}
/* last input in group (no append) gets right radius */
.lp-input-group:not(:has(.input-group-append)) .lp-input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}
.lp-input:focus {
    background: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
    outline: none;
}
.lp-input:focus ~ .input-group-append .lp-pw-toggle,
.lp-input-group:focus-within .lp-input-prepend,
.lp-input-group:focus-within .lp-pw-toggle {
    border-color: var(--primary) !important;
}
.lp-input::placeholder { color: #94a3b8 !important; }

/* Submit button */
.lp-btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: .875rem !important;
    letter-spacing: .01em;
    transition: all .25s !important;
    box-shadow: 0 6px 20px rgba(79,70,229,.35) !important;
}
.lp-btn-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(79,70,229,.45) !important;
    color: #fff !important;
}
.lp-btn-submit:active { transform: translateY(0) !important; }

/* Footer */
.lp-footer {
    text-align: center;
    color: #94a3b8;
    font-size: .775rem;
    margin-top: 1.75rem;
}

/* Alert inside login */
.lp-card .alert {
    border-radius: var(--radius-sm) !important;
    border: none !important;
    font-size: .875rem !important;
    padding: .75rem 1rem !important;
}
.lp-card .alert-danger  { background: #fef2f2 !important; color: #dc2626 !important; }
.lp-card .alert-success { background: #f0fdf4 !important; color: #16a34a !important; }

/* Mobile */
@media (max-width: 480px) {
    .lp-card { padding: 2rem 1.5rem; border-radius: 16px; }
    .lp-logo-img { height: 52px; }
    .lp-brand-name { font-size: 1rem; }
}


/* ────────────────────────────────────────────────────────────
   3. SIDEBAR
──────────────────────────────────────────────────────────── */
.main-sidebar,
.main-sidebar .sidebar {
    background: var(--sidebar-bg) !important;
}

/* Brand */
.main-sidebar .brand-link {
    background: rgba(255,255,255,.04) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    padding: .85rem 1.25rem !important;
    transition: background .2s;
}
.main-sidebar .brand-link:hover { background: rgba(255,255,255,.08) !important; }
.main-sidebar .brand-text {
    color: #fff !important;
    font-size: .9rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
}
.main-sidebar .brand-image { border-radius: 8px !important; }

/* User panel */
.sidebar .user-panel {
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    padding: 1rem .5rem !important;
    margin: .5rem .5rem 0 !important;
}
.sidebar .user-panel .info a {
    color: rgba(255,255,255,.9) !important;
    font-weight: 500 !important;
    font-size: .875rem;
}
.sidebar .user-panel img {
    border-radius: 8px !important;
    border: 2px solid rgba(255,255,255,.15) !important;
}

/* Nav header labels */
.nav-sidebar .nav-header {
    color: rgba(255,255,255,.3) !important;
    font-size: .65rem !important;
    letter-spacing: .12em !important;
    font-weight: 700 !important;
    padding: 1rem 1rem .4rem !important;
}

/* Nav items */
.nav-sidebar .nav-item { margin: 2px 8px !important; }
.nav-sidebar .nav-link {
    border-radius: 10px !important;
    color: rgba(255,255,255,.6) !important;
    padding: .6rem 1rem !important;
    transition: background .18s, color .18s !important;
}
.nav-sidebar .nav-link:hover {
    background: var(--sidebar-hover) !important;
    color: #fff !important;
}
.nav-sidebar .nav-link.active {
    background: var(--sidebar-active) !important;
    color: #a5b4fc !important;
    font-weight: 600 !important;
}
.nav-sidebar .nav-link .nav-icon {
    color: inherit !important;
    width: 1.6rem !important;
    font-size: .875rem !important;
}

/* Sidebar search */
.sidebar .form-inline { padding: .5rem .75rem !important; }
.sidebar .form-control-sidebar {
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 8px 0 0 8px !important;
    color: #fff !important;
    font-size: .85rem !important;
}
.sidebar .form-control-sidebar::placeholder { color: rgba(255,255,255,.35) !important; }
.sidebar .btn-sidebar {
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    color: rgba(255,255,255,.4) !important;
    border-radius: 0 8px 8px 0 !important;
}


/* ────────────────────────────────────────────────────────────
   4. NAVBAR
──────────────────────────────────────────────────────────── */
.main-header.navbar {
    background: #fff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.06) !important;
    padding: .375rem 1rem !important;
}
.main-header .navbar-nav .nav-link { color: #64748b !important; }
.main-header .navbar-nav .nav-link:hover { color: var(--primary) !important; }
.main-header [data-widget="pushmenu"] { color: #475569 !important; }
.main-header [data-widget="pushmenu"]:hover { color: var(--primary) !important; }

/* User dropdown */
.navbar .user-image { border-radius: 8px !important; border: 2px solid #e0e7ff !important; }
.navbar .user-menu .dropdown-menu {
    border-radius: var(--radius) !important;
    border: none !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.14) !important;
    overflow: hidden;
    min-width: 230px !important;
}
.navbar .user-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    padding: 1.25rem !important;
}
.navbar .user-header img { border-radius: 10px !important; }
.navbar .user-footer { padding: .875rem 1rem !important; }
.navbar .user-footer .btn-block { border-radius: 8px !important; font-weight: 500 !important; font-size: .875rem !important; }

.navbar-badge { border-radius: 6px !important; font-size: .6rem !important; padding: 2px 5px !important; }


/* ────────────────────────────────────────────────────────────
   5. CONTENT AREA
──────────────────────────────────────────────────────────── */
.content-wrapper { background: var(--body-bg) !important; }

.content-header { padding: 1.25rem 1.5rem .5rem !important; }
.content-header h1 { font-size: 1.35rem !important; font-weight: 700 !important; color: #0f172a !important; }

.breadcrumb { background: transparent !important; padding: 0 !important; font-size: .8rem !important; }
.breadcrumb-item a { color: var(--primary) !important; }
.breadcrumb-item.active { color: #94a3b8 !important; }
.breadcrumb-item + .breadcrumb-item::before { color: #cbd5e1 !important; }


/* ────────────────────────────────────────────────────────────
   6. CARDS
──────────────────────────────────────────────────────────── */
.card {
    border: none !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--card-shadow) !important;
    background: #fff !important;
}
.card-header {
    background: #fff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 1rem 1.5rem !important;
}
.card-title { font-size: .9375rem !important; font-weight: 600 !important; color: #0f172a !important; }
.card-body  { padding: 1.25rem 1.5rem !important; }
.card-footer {
    background: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
    padding: .875rem 1.5rem !important;
}
.card-primary > .card-header { border-top: 3px solid var(--primary) !important; }
.card-success > .card-header { border-top: 3px solid var(--success) !important; }
.card-danger  > .card-header { border-top: 3px solid var(--danger)  !important; }
.card-warning > .card-header { border-top: 3px solid var(--warning) !important; }


/* ────────────────────────────────────────────────────────────
   7. DASHBOARD STAT CARDS
──────────────────────────────────────────────────────────── */
.stat-card {
    border-radius: var(--radius) !important;
    border: none !important;
    box-shadow: var(--card-shadow) !important;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    margin-bottom: 1rem;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.13) !important;
}
.stat-card .stat-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.5rem; color: #fff;
}
.stat-card .stat-label { font-size: .775rem; font-weight: 600; opacity: .85; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .stat-number { font-size: 2.25rem; font-weight: 800; line-height: 1; }
.stat-card .stat-sub { font-size: .775rem; opacity: .72; margin-top: .375rem; }
.stat-card .stat-icon {
    width: 62px; height: 62px;
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.stat-indigo  { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.stat-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.stat-amber   { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-rose    { background: linear-gradient(135deg, #dc2626, #f43f5e); }


/* ────────────────────────────────────────────────────────────
   8. TABLES
──────────────────────────────────────────────────────────── */
.table { font-size: .875rem !important; color: #374151 !important; }
.table th {
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: .775rem !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    border-bottom: 2px solid #e2e8f0 !important;
    background: #f8fafc !important;
    padding: .875rem 1rem !important;
    white-space: nowrap;
}
.table td { vertical-align: middle !important; padding: .75rem 1rem !important; border-color: #f1f5f9 !important; }
.table-hover tbody tr:hover { background: #f8fafc !important; }
.thead-dark th { background: #1e293b !important; color: #e2e8f0 !important; border-bottom: none !important; }


/* ────────────────────────────────────────────────────────────
   9. BADGES
──────────────────────────────────────────────────────────── */
.badge { font-size: .725rem !important; font-weight: 600 !important; padding: .35em .7em !important; border-radius: 6px !important; }
.badge-success   { background: #dcfce7 !important; color: #16a34a !important; }
.badge-danger    { background: #fee2e2 !important; color: #dc2626 !important; }
.badge-warning   { background: #fef3c7 !important; color: #b45309 !important; }
.badge-info      { background: #dbeafe !important; color: #1d4ed8 !important; }
.badge-secondary { background: #f1f5f9 !important; color: #64748b !important; }
.badge-primary   { background: var(--primary-light) !important; color: var(--primary) !important; }


/* ────────────────────────────────────────────────────────────
   10. BUTTONS
──────────────────────────────────────────────────────────── */
.btn {
    border-radius: 8px !important;
    font-size: .875rem !important;
    font-weight: 500 !important;
    padding: .5rem 1.125rem !important;
    transition: all .2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .35rem !important;
    border: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .375rem .75rem !important; font-size: .8125rem !important; }

.btn-primary  { background: var(--primary) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(79,70,229,.3) !important; }
.btn-primary:hover { background: var(--primary-dark) !important; box-shadow: 0 6px 16px rgba(79,70,229,.4) !important; color: #fff !important; }
.btn-success  { background: var(--success) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(5,150,105,.3) !important; }
.btn-warning  { background: var(--warning) !important; color: #fff !important; }
.btn-danger   { background: var(--danger) !important; color: #fff !important; box-shadow: 0 4px 12px rgba(220,38,38,.25) !important; }
.btn-secondary{ background: #f1f5f9 !important; color: #475569 !important; }
.btn-secondary:hover { background: #e2e8f0 !important; }
.btn-default  { background: #f8fafc !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; }


/* ────────────────────────────────────────────────────────────
   11. FORM CONTROLS
──────────────────────────────────────────────────────────── */
.form-control {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: var(--radius-sm) !important;
    font-size: .9375rem !important;
    padding: .625rem .875rem !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    transition: border-color .2s, box-shadow .2s, background .2s !important;
}
.form-control:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1) !important;
}
.form-control.is-invalid { border-color: var(--danger) !important; }
.form-group label { font-size: .875rem; font-weight: 500; color: #374151; }
.invalid-feedback { font-size: .8125rem !important; color: var(--danger) !important; }


/* ────────────────────────────────────────────────────────────
   12. ALERTS (Flash messages)
──────────────────────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-sm) !important;
    border: none !important;
    font-size: .875rem !important;
    padding: .875rem 1.125rem !important;
    display: flex !important;
    align-items: center !important;
    gap: .625rem !important;
}
.alert-success { background: #f0fdf4 !important; color: #16a34a !important; }
.alert-danger  { background: #fef2f2 !important; color: #dc2626 !important; }
.alert-warning { background: #fffbeb !important; color: #92400e !important; }
.alert .close  { color: inherit !important; opacity: .6; }
.alert-dismissible .close { top: 50% !important; transform: translateY(-50%); padding: 0 1rem !important; }


/* ────────────────────────────────────────────────────────────
   13. FOOTER
──────────────────────────────────────────────────────────── */
.main-footer {
    background: #fff !important;
    border-top: 1px solid #f1f5f9 !important;
    color: #94a3b8 !important;
    font-size: .8rem !important;
    padding: .875rem 1.5rem !important;
}
.main-footer a { color: var(--primary) !important; }


/* ────────────────────────────────────────────────────────────
   14. DATATABLES
──────────────────────────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: .375rem .75rem !important;
    font-size: .875rem !important;
    margin-left: .5rem;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1) !important;
}
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: .3rem .5rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: none !important;
    font-size: .8rem !important;
    color: #64748b !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border: none !important;
}
.dt-buttons .btn { margin-right: .375rem !important; }


/* ────────────────────────────────────────────────────────────
   15. MOBILE
──────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .content-header h1 { font-size: 1.15rem !important; }
}
@media (max-width: 768px) {
    .content-header { padding: 1rem !important; }
    .card-body  { padding: 1rem !important; }
    .card-header { padding: .875rem 1rem !important; }
    .stat-card .stat-number { font-size: 1.875rem !important; }
    .stat-card .stat-inner  { padding: 1.25rem !important; }
    .stat-card .stat-icon   { width: 52px; height: 52px; font-size: 1.25rem; }
    .table th, .table td { padding: .6rem .75rem !important; }
}
@media (max-width: 576px) {
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length { text-align: left !important; }
}


/* ────────────────────────────────────────────────────────────
   16. SCROLLBAR
──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
