/* UI polish for subfolder deployment: /tvkapuashulu */
:root {
    --ui-bg: #f3f4f6;
    --ui-surface: #ffffff;
    --ui-text: #1f2937;
    --ui-muted: #6b7280;
    --ui-border: #e5e7eb;
    --ui-primary: #bafa34;
    --ui-dark: #111827;
    --ui-radius: 16px;
}

html, body {
    min-height: 100%;
    background: var(--ui-bg) !important;
    color: var(--ui-text) !important;
}

body, input, textarea, select, button, .form-control, .btn, .table {
    font-family: "Rubik", Arial, sans-serif !important;
}

img { max-width: 100%; }

/* Login */
.left-caption {
    min-height: 100vh;
    background: linear-gradient(135deg, #111827 0%, #1f2937 52%, #0f172a 100%);
    overflow: hidden;
}
.left-caption .bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    opacity: .32;
    filter: saturate(1.05) contrast(1.02);
}
.left-caption .caption {
    min-height: 100vh;
    padding: 32px 16px !important;
    background: radial-gradient(circle at top left, rgba(186,250,52,.22), transparent 34%), rgba(17,24,39,.50) !important;
}
.login-card {
    width: min(440px, 100%);
    border-radius: 24px;
    padding: 34px !important;
    background: rgba(17,24,39,.88) !important;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
    backdrop-filter: blur(12px);
}
.login-card h3 { font-size: 30px; }
.login-card h4 { color: rgba(255,255,255,.82); font-size: 16px; line-height: 1.55; }
.app-logo img { max-width: 170px; height: auto; object-fit: contain; }
.login-card label { color: rgba(255,255,255,.82); font-weight: 600; }
.login-card .form-control {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.96);
    color: #111827;
    box-shadow: none;
}
.login-card .form-control:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 4px rgba(186,250,52,.22);
}
.login-card .btn-default {
    height: 48px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(186,250,52,.22);
}

/* Layout */
.sidebar {
    background: #111827 !important;
    color: #e5e7eb;
    box-shadow: 18px 0 40px rgba(15,23,42,.08);
}
.sidebar .side-logo h3,
.header .side-logo h3 { font-weight: 800; letter-spacing: -.02em; }
.sidebar .side-menu a,
.sidebar .side-menu .side-submenu a {
    border-radius: 14px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.sidebar .side-menu a:hover {
    background: rgba(255,255,255,.08);
    transform: translateX(2px);
}
.sidebar .side-menu .active > a,
.sidebar .side-menu .side_line.active,
.sidebar .side-menu .side-submenu .active {
    background: var(--ui-primary) !important;
    color: #111827 !important;
}
.sidebar .partition span { color: rgba(255,255,255,.54) !important; }

.right-content { min-height: 100vh; background: var(--ui-bg); }
.header {
    background: rgba(255,255,255,.92) !important;
    color: var(--ui-text) !important;
    border-bottom: 1px solid var(--ui-border);
    box-shadow: 0 8px 28px rgba(15,23,42,.06);
    backdrop-filter: blur(10px);
}
.header .page-title { color: var(--ui-text); font-size: clamp(22px, 2vw, 30px); }
.header .head-control .head-btn {
    background: #111827 !important;
    box-shadow: 0 10px 24px rgba(17,24,39,.12) !important;
}
.body-content { padding: 28px; }
.page-title-sm { color: var(--ui-text) !important; }

/* Cards, tables, forms */
.card, .custom-card, .custom-border-card, .border-card, .summary-table-card {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius) !important;
    box-shadow: 0 14px 32px rgba(15,23,42,.07) !important;
    overflow: hidden;
}
.card, .border-card, .summary-table-card { background: var(--ui-surface) !important; color: var(--ui-text) !important; }
.card-header, .custom-border-card .card-header {
    background: #fff !important;
    color: var(--ui-text) !important;
    border-bottom: 1px solid var(--ui-border) !important;
}
.card-body { color: var(--ui-text); }
.custom-card .card-body { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-color-primary { background: #fff !important; color: var(--ui-text) !important; }
.card-icon-primary {
    background: rgba(186,250,52,.22) !important;
    color: #111827 !important;
    border-radius: 16px !important;
}

.form-control, .custom-select, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
    border-radius: 12px !important;
    border: 1px solid var(--ui-border) !important;
    color: var(--ui-text) !important;
    background-color: #fff !important;
    box-shadow: none !important;
}
.form-control:focus, .custom-select:focus, textarea:focus, input:focus {
    border-color: #9cd927 !important;
    box-shadow: 0 0 0 4px rgba(186,250,52,.24) !important;
}
label { color: var(--ui-text); font-weight: 600; }
.btn { border-radius: 12px !important; font-weight: 700; }
.btn-default, .btn-primary {
    background: var(--ui-primary) !important;
    border-color: var(--ui-primary) !important;
    color: #111827 !important;
}
.btn-default:hover, .btn-primary:hover { filter: brightness(.96); }
.btn-danger, .red-bg { color: #fff !important; }

.table-responsive { border-radius: var(--ui-radius); }
.table { color: var(--ui-text) !important; background: #fff; margin-bottom: 0; }
.table thead th {
    background: #f9fafb !important;
    color: #374151 !important;
    border-bottom: 1px solid var(--ui-border) !important;
    font-weight: 800;
    white-space: nowrap;
}
.table td { color: var(--ui-text) !important; vertical-align: middle !important; border-top: 1px solid var(--ui-border) !important; }
.table tbody tr:hover { background: #f9fafb; }
.dataTables_wrapper, .dataTables_info, .dataTables_length, .dataTables_filter { color: var(--ui-text) !important; }
.pagination .page-link { color: #111827; border-radius: 10px; margin: 0 2px; }
.pagination .active .page-link { background: var(--ui-primary); border-color: var(--ui-primary); color: #111827; }
.dropdown-menu { border: 1px solid var(--ui-border) !important; box-shadow: 0 18px 40px rgba(15,23,42,.12) !important; }
.dropdown-menu .dropdown-item { color: var(--ui-text) !important; }
.alert { border-radius: 14px; }
#dvloader {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(17,24,39,.38);
    align-items: center; justify-content: center;
}
#dvloader img { width: 64px; height: 64px; object-fit: contain; }

@media (max-width: 991.98px) {
    .body-content { padding: 18px; }
    .header { padding: 16px !important; }
    .login-card { padding: 26px !important; }
    .left-caption .caption { align-items: flex-start; padding-top: 42px !important; }
}
@media (max-width: 575.98px) {
    .login-card { padding: 22px !important; border-radius: 20px; }
    .login-card h3 { font-size: 26px; }
    .app-logo img { max-width: 140px; }
    .body-content { padding: 14px; }
    .card-body { padding: 16px; }
}
