/* ============================================================
   Jantri — application theme
   nav red #C52D2F · body #EEEEEE · cards #2E6090 · header blue
   ============================================================ */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

body {
    background: #eeeeee;
    color: #212529;
}

/* -------- top menu (#cssmenu) -------- */
#cssmenu, #cssmenu ul, #cssmenu ul li, #cssmenu ul li a, #cssmenu #menu-button {
    margin: 0; padding: 0; border: 0; list-style: none; line-height: 1;
    display: block; position: relative; box-sizing: border-box;
}
#cssmenu:after, #cssmenu > ul:after {
    content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;
}
#cssmenu #menu-button { display: none; }
#cssmenu {
    font-family: Montserrat, sans-serif;
    background: #C52D2F;
    margin-left: 8%; margin-right: 8%; margin-bottom: 10px;
}
#cssmenu > ul > li { float: left; }
#cssmenu > ul > li > a {
    padding: 17px; font-size: 12px; letter-spacing: 1px; text-decoration: none;
    color: #fff; font-weight: 700; text-transform: uppercase;
}
#cssmenu > ul > li > a u { text-decoration: underline; }
#cssmenu > ul > li:hover > a { color: #ffffff; background: rgba(0,0,0,.08); }
#cssmenu > ul > li.has-sub > a { padding-right: 30px; }
#cssmenu > ul > li.has-sub > a:after {
    position: absolute; top: 22px; right: 11px; width: 8px; height: 2px;
    display: block; background: #fff; content: '';
}
#cssmenu > ul > li.has-sub > a:before {
    position: absolute; top: 19px; right: 14px; display: block; width: 2px; height: 8px;
    background: #fff; content: ''; transition: all .25s ease;
}
#cssmenu > ul > li.has-sub:hover > a:before { top: 23px; height: 0; }
#cssmenu ul ul {
    position: absolute; left: -9999px; z-index: 999;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
#cssmenu ul ul li { height: 0; transition: all .25s ease; }
#cssmenu li:hover > ul { left: auto; }
#cssmenu li:hover > ul > li { height: 35px; }
#cssmenu ul ul ul { margin-left: 100%; top: 0; }
#cssmenu ul ul li a {
    border-bottom: 1px solid rgba(150,150,150,0.15); padding: 11px 15px; width: 190px;
    font-size: 12px; text-decoration: none; color: #000; background: #f9f9f9; font-weight: bold;
}
#cssmenu ul ul li a u { color: #C52D2F; }
#cssmenu ul ul li:last-child > a { border-bottom: 0; }
#cssmenu ul ul li:hover > a, #cssmenu ul ul li a:hover { background: #ddd; }
#cssmenu ul ul li.has-sub > a:after {
    position: absolute; top: 16px; right: 11px; width: 8px; height: 2px;
    display: block; background: #000; content: '';
}
#cssmenu ul ul li.has-sub > a:before {
    position: absolute; top: 13px; right: 14px; display: block; width: 2px; height: 8px;
    background: #000; content: ''; transition: all .25s ease;
}
#cssmenu ul ul > li.has-sub:hover > a:before { top: 17px; height: 0; }

/* -------- homepage launcher cards -------- */
.home-cards { margin: 0 8%; }
.launch-card {
    background: #2E6090; color: #fff; border-radius: 10px; padding: 20px 24px;
    margin-bottom: 20px;
}
.launch-card h2 { font-weight: 700; margin-bottom: 14px; }
.launch-card a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.launch-card a:hover { text-decoration: underline; }
.launch-card .group { margin-bottom: 10px; }
.launch-card .group > a { font-size: 1.05rem; }
.launch-card .sub a { padding-left: 22px; font-size: .95rem; opacity: .95; }
.launch-card hr { border-color: rgba(255,255,255,.4); }

/* -------- data tables / cards -------- */
.card-panel { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 18px; }
table.jantri-table thead th { background: #4E6FA6; color: #fff; font-weight: 600; white-space: nowrap; }
table.jantri-table td, table.jantri-table th { vertical-align: middle; }
.money-pos { color: #198754; }
.money-neg { color: #dc3545; }

/* -------- buttons -------- */
.btn-primary, .btn-jantri { background: #4E77B3; border-color: #4E77B3; }
.btn-primary:hover, .btn-jantri:hover { background: #3f639a; border-color: #3f639a; }
.page-title { font-weight: 700; color: #2E4B7A; }
h1.plain-title { font-weight: 700; color: #222; margin: 10px 0 18px; }
.contact-info h2 { font-weight: 700; color: #333; font-size: 1.9rem; margin-bottom: .4rem; }
.contact-info p { margin-bottom: .55rem; }

/* -------- sectioned forms (Party / Company) -------- */
.app-wrap { margin: 0 8%; }
.form-section {
    background: #f7f7f7; border: 1px solid #e6e6e6; border-radius: 10px;
    padding: 16px 20px; margin-bottom: 22px;
}
.form-section > h5 {
    color: #2f2fb3; font-size: .85rem; font-weight: 700; margin-bottom: 16px;
    border-bottom: 1px solid #ececec; padding-bottom: 10px;
}
.form-section label { font-weight: 700; font-size: .82rem; margin-bottom: 4px; display: block; }
.form-section .form-control, .form-section .form-select { border-radius: 4px; }

/* -------- report-style pages (lavender bg card) -------- */
.report-page { background: #fff; border-radius: 12px; padding: 26px; box-shadow: 0 1px 5px rgba(0,0,0,.06); }
.report-title { text-align: center; color: #4E77B3; font-weight: 700; }
.report-hint { text-align: center; color: #666; font-size: .85rem; margin-bottom: 8px; }
kbd.fkey { background:#333; color:#fff; border-radius:4px; padding:1px 6px; font-size:.75rem; }

/* -------- master sheet / cutting grid -------- */
.sheet-header { display:flex; align-items:center; gap:16px; border-bottom:1px solid #ddd; padding:6px 0; }
.sheet-header .title { font-weight:700; font-size:1.15rem; margin-right:auto; }
.sheet-tab { font-weight:700; padding:8px 16px; border-radius:6px 6px 0 0; cursor:pointer; color:#4E77B3; }
.sheet-tab.active { background:#fff; border:1px solid #ddd; border-bottom:0; color:#222; }
.jantri-grid { border-collapse:collapse; width:auto; }
.jantri-grid td { border:1px solid #5b7db1; width:66px; height:52px; padding:3px 7px 5px; vertical-align:top; position:relative; }
.jantri-grid td .jn { color:var(--jn,#c00000); font-weight:700; text-decoration:underline; font-size:.75rem; }
.jantri-grid td .jv { display:block; text-align:right; color:var(--jv,#111); font-weight:700; font-size:1.02rem; margin-top:4px; }
.jantri-grid td.dim .jv { opacity:.18; }
.jantri-grid td.rowtot { border:0; text-align:right; font-weight:700; color:#111; width:auto; padding-left:16px; font-size:1.02rem; }
.jantri-grid td.pnl-neg .jv { color:#dc3545; }
.grand-total { color:#c00000; font-weight:800; font-size:1.5rem; text-align:right; padding-top:6px; }
.party-list { border:1px solid #ddd; border-radius:6px; height:430px; overflow-y:auto; background:#fff; }
.party-list .p-row { display:flex; align-items:center; gap:6px; padding:3px 8px; border-bottom:1px solid #f0f0f0; font-size:.82rem; }
.party-list .p-row .p-amt { margin-left:auto; font-weight:600; }
.party-list .p-row.checked { background:#eef4ff; }
.sheet-controls .report-page { background:#e9eef4; box-shadow:none; padding:16px; }
.sheet-controls label { font-size:.8rem; font-weight:600; }
.sheet-controls .stat-row { display:flex; justify-content:space-between; padding:2px 0; font-size:.85rem; }
.sheet-controls .stat-row b { font-weight:600; }
.jt-btn { background:#c0392b; color:#fff; border:0; border-radius:4px; padding:5px 12px; font-weight:700; }

/* -------- floating action buttons -------- */
.fab-wrap { position: fixed; right: 26px; bottom: 24px; display:flex; flex-direction:column; gap:14px; z-index: 40; }
.fab { width: 54px; height: 54px; border-radius: 50%; border: 0; color:#fff; font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0,0,0,.25); display:flex; align-items:center; justify-content:center; }
.fab-blue { background: #2563EB; }
.fab-green { background: #059669; }

/* -------- login (Colorlib "Login Form v" green) -------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: #f2f2f2; font-family: Montserrat, sans-serif; }
.login-card { width: 420px; max-width: 92vw; background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.login-head { background: #57B846; color: #fff; text-align: center; padding: 34px; font-size: 2rem; font-weight: 700; }
.login-body { padding: 30px 34px 40px; }
.login-body .form-control {
    background: #e6e6e6; border: 0; border-radius: 30px; padding: 16px 22px; margin-bottom: 18px; font-weight: 600;
}
.login-body .form-control::placeholder { color: #555; font-weight: 600; }
.btn-signin {
    background: #57B846; color: #fff; border: 0; border-radius: 30px; width: 100%;
    padding: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.btn-signin:hover { background: #4aa23b; }
.login-forgot { text-align: right; margin-bottom: 16px; color: #666; font-size: .9rem; }
.login-forgot a { color: #57B846; text-decoration: none; }

@media all and (max-width: 768px) {
    #cssmenu { margin: 0; }
    .home-cards, .launch-card { margin-left: 0; margin-right: 0; }
}

/* ---- Delete Data page ---- */
.delete-data-card { padding: 28px 34px; }
.dd-backup { background:#f4f6f9; border-radius:8px; padding:14px 16px; }
.dd-label { color:#333; }
.dd-opt { display:flex; gap:12px; align-items:flex-start; border:1px solid #dfe3e8; border-radius:8px; padding:14px 16px; margin-bottom:12px; cursor:pointer; transition:border-color .15s, background .15s; }
.dd-opt input[type=radio] { margin-top:3px; }
.dd-opt-title { font-weight:700; color:#333; font-size:.95rem; }
.dd-opt-desc { color:#8a929c; font-size:.82rem; margin-top:3px; line-height:1.4; }
.dd-opt.selected { border-color:#4E77B3; background:#e9edf3; }
.dd-opt.disabled { opacity:.55; cursor:not-allowed; }
.dd-opt.disabled .dd-opt-title { color:#8a929c; }
.dd-games { max-height:300px; overflow-y:auto; }
.dd-game { font-weight:700; color:#333; font-size:.88rem; padding:3px 0; cursor:pointer; }
.dd-game input { margin-right:7px; }

/* ---- Client Settings Manager ---- */
.csm-panel { background:#fff; border:1px solid #e2e6ea; border-radius:8px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.05); }
.csm-head { background:#f4f6f9; border-bottom:1px solid #e2e6ea; padding:12px 18px; font-weight:700; color:#333; }
.csm-body { padding:20px 18px; }
.csm-count { display:inline-block; background:#4b5563; color:#fff; border-radius:11px; font-size:.75rem; padding:1px 9px; margin-left:4px; vertical-align:middle; }
.csm-table thead th { background:#5f78ab; color:#fff; border-color:#4E77B3; font-weight:700; }
.csm-badge { display:inline-block; background:#4E77B3; color:#fff; border-radius:4px; font-size:.72rem; font-weight:700; padding:2px 9px; letter-spacing:.3px; }
.csm-key { color:#c2185b; font-family:'Courier New',monospace; font-size:.85rem; }
.csm-act { display:inline-block; width:30px; height:30px; line-height:30px; text-align:center; border-radius:5px; border:none; color:#fff; margin-right:4px; }
.csm-edit { background:#e0a800; }
.csm-del { background:#dc3545; }
