/**
 * Mandala SIM — Modern UI layer
 * Overrides legacy Bootstrap 3 / Xavier theme
 */

[x-cloak] { display: none !important; }

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body.app-root,
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    background: #fafafa !important;
    color: #18181b;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Logo transparan — tampilkan asli tanpa filter */
.app-logo-img,
.login-logo-img,
#app-sidebar img[src*="logo-mcs"],
.login-split-brand img[src*="logo-mcs"] {
    display: block;
    width: auto;
    max-width: 240px;
    height: auto;
    max-height: 96px;
    object-fit: contain;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
    -webkit-box-shadow: none !important;
}

#page-wrapper,
#side-menu,
#top-navbar,
.right-sidebar,
#to-top,
.gray-bg { background: transparent !important; }

.title-header {
    margin: 0 0 1.75rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.title-header > i.fas,
.title-header > i.far {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    background: #fef2f2;
    color: #dc2626;
    font-size: 1rem;
}

.title-header h2 {
    margin: 0 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em;
    color: #18181b !important;
    line-height: 1.2;
}

.breadcrumb {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 0.9375rem;
}

.breadcrumb > li + li:before {
    content: "/";
    padding: 0 0.5rem;
    color: #a1a1aa;
}

.breadcrumb a { color: #71717a; text-decoration: none; }
.breadcrumb a:hover { color: #dc2626; }
.breadcrumb > .active { color: #a1a1aa; }

.panel {
    border: 1px solid #e4e4e7 !important;
    border-radius: 1rem !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04) !important;
    background: #fff !important;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.panel-heading {
    background: #fff !important;
    border-bottom: 1px solid #f4f4f5 !important;
    padding: 1rem 1.25rem !important;
}

.panel-title {
    font-size: 1.0625rem !important;
    font-weight: 600 !important;
    color: #18181b !important;
    margin: 0 !important;
}

.panel-body { padding: 1.25rem !important; }

.panel-footer {
    background: #fafafa !important;
    border-top: 1px solid #f4f4f5 !important;
    padding: 0.875rem 1.25rem !important;
}

.fi-widget {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid #e4e4e7;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .2s;
    height: 100%;
}

.fi-widget:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-1px);
}

.fi-widget-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.fi-widget--info .fi-widget-icon { background: #eff6ff; color: #2563eb; }
.fi-widget--success .fi-widget-icon { background: #ecfdf5; color: #059669; }
.fi-widget--warning .fi-widget-icon { background: #fffbeb; color: #d97706; }
.fi-widget--danger .fi-widget-icon { background: #fef2f2; color: #dc2626; }

.fi-widget-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    margin: 0 0 0.25rem;
}

.fi-widget-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #18181b;
    margin: 0;
    line-height: 1.1;
}

.fi-widget-sub { font-size: 0.8125rem; color: #a1a1aa; margin: 0.25rem 0 0; }

.table { margin-bottom: 0 !important; }

.table > thead > tr > th {
    background: #fafafa !important;
    border-bottom: 1px solid #e4e4e7 !important;
    color: #52525b !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem !important;
}

.table > tbody > tr > td {
    padding: 0.875rem 1rem !important;
    border-top: 1px solid #f4f4f5 !important;
    vertical-align: middle !important;
    color: #3f3f46;
    font-size: 0.9375rem;
}

.table-striped > tbody > tr:nth-of-type(odd) { background: #fafafa !important; }
.table-hover > tbody > tr:hover { background: #f4f4f5 !important; }

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.8125rem;
    color: #71717a;
    padding: 0.75rem 0;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e4e4e7;
    border-radius: 0.625rem;
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
}

.dataTables_wrapper .pagination > li > a {
    border-radius: 0.5rem !important;
    margin: 0 2px;
    border-color: #e4e4e7 !important;
    color: #52525b !important;
}

.dataTables_wrapper .pagination > .active > a {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.btn {
    border-radius: 0.625rem !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    padding: 0.5625rem 1.125rem !important;
    transition: all .15s !important;
}

.btn-primary, .btn-success { background: #dc2626 !important; border-color: #dc2626 !important; }
.btn-primary:hover, .btn-success:hover { background: #b91c1c !important; border-color: #b91c1c !important; }
.btn-default { background: #fff !important; border-color: #e4e4e7 !important; color: #3f3f46 !important; }
.btn-default:hover { background: #f4f4f5 !important; }

.form-control {
    border: 1px solid #e4e4e7 !important;
    border-radius: 0.625rem !important;
    box-shadow: none !important;
    padding: 0.5625rem 0.9375rem !important;
    height: auto !important;
    font-size: 0.9375rem !important;
}

.form-control:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}

label { font-weight: 500; font-size: 0.9375rem; color: #3f3f46; }
.help-block { font-size: 0.8125rem; color: #ef4444; }

.nav-tabs { border-bottom: 1px solid #e4e4e7 !important; margin-bottom: 1.25rem; }
.nav-tabs > li > a {
    border: none !important;
    color: #71717a !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1rem !important;
}

.nav-tabs > li.active > a {
    color: #dc2626 !important;
    background: transparent !important;
    border-bottom: 2px solid #dc2626 !important;
    font-weight: 600;
}

.modal-content {
    border: none !important;
    border-radius: 1rem !important;
    box-shadow: 0 24px 48px rgba(0,0,0,.16) !important;
}

.modal-header { border-bottom: 1px solid #f4f4f5 !important; padding: 1.25rem 1.5rem !important; }
.modal-body { padding: 1.5rem !important; }
.modal-footer { border-top: 1px solid #f4f4f5 !important; background: #fafafa; }

.alert { border: none !important; border-radius: 0.75rem !important; font-size: 0.875rem; }
.alert-success { background: #ecfdf5 !important; color: #065f46 !important; }
.alert-danger { background: #fef2f2 !important; color: #991b1b !important; }

footer, .app-main > footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e4e4e7;
    font-size: 0.8125rem;
    color: #a1a1aa;
    text-align: center;
}

footer a { color: #dc2626; }

.well {
    border: 1px solid #e4e4e7 !important;
    border-radius: 0.875rem !important;
    background: #fafafa !important;
    box-shadow: none !important;
}

.login-split { min-height: 100vh; display: flex; }

.login-split-brand {
    display: none;
    width: 50%;
    background: linear-gradient(145deg, #7f1d1d 0%, #dc2626 45%, #ef4444 100%);
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .login-split-brand { display: flex; }
}

.login-split-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.12), transparent 50%),
                radial-gradient(circle at 75% 80%, rgba(0,0,0,.08), transparent 45%);
    pointer-events: none;
}

/* Logo di panel merah — tanpa kotak hitam, drop-shadow halus agar terbaca */
.login-split-brand .app-logo-img,
.login-split-brand .login-logo-img {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.18)) !important;
    background: transparent !important;
}

.login-split-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #fafafa;
}

.login-card-modern {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 1.25rem;
    padding: 2.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 48px rgba(0,0,0,.08);
}

.login-input-wrap { position: relative; margin-bottom: 1rem; }

.login-input-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    font-size: 0.875rem;
    pointer-events: none;
}

.login-input-wrap input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.875rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
    background: #fafafa;
}

.login-input-wrap input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12);
    background: #fff;
}

.login-btn-modern {
    width: 100%;
    padding: 0.9375rem;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    margin-top: 0.5rem;
}

.login-btn-modern:hover { background: #b91c1c; }

.table-responsive { border: none !important; border-radius: 0.75rem; overflow-x: auto; }

@media (max-width: 1023px) {
    .app-main { padding: 1.125rem !important; }
    .title-header h2 { font-size: 1.5rem !important; }
    .fi-widget-value { font-size: 1.75rem; }
}
