/* ===================== NSK KHATA BOOK — Saffron / Cream / Gold Theme ===================== */
#nsk-khata-app, #nsk-khata-app * { box-sizing: border-box; }

/* Page Lock Screen */
.nsk-page-lock {
    display: flex; align-items: center; justify-content: center;
    min-height: 320px;
    background: linear-gradient(180deg, #fffaf0 0%, #fff3d9 100%);
    border-radius: 14px;
}
.nsk-lock-box {
    text-align: center; background: #fff; border: 2px solid #e6b400;
    border-radius: 14px; padding: 32px 28px; max-width: 320px; width: 100%;
    box-shadow: 0 6px 24px rgba(230, 126, 0, 0.2);
}
.nsk-lock-icon { font-size: 40px; margin-bottom: 8px; }
.nsk-lock-box h3 { margin: 0 0 4px; color: #b34700; letter-spacing: 1.5px; }
.nsk-lock-box p { margin: 0 0 16px; color: #8a5300; font-size: 13px; font-weight: 600; }
.nsk-lock-box input {
    width: 100%; padding: 11px 14px; border: 1.5px solid #e8c877; border-radius: 8px;
    font-size: 15px; text-align: center; letter-spacing: 2px; margin-bottom: 12px;
}
.nsk-lock-box input:focus { outline: none; border-color: #d35400; }
.nsk-lock-box button {
    width: 100%; padding: 12px; font-size: 15px; font-weight: 800;
    background: linear-gradient(135deg, #d35400, #e67e22); color: #fff;
    border: none; border-radius: 10px; cursor: pointer;
}
.nsk-lock-box button:hover { filter: brightness(1.08); }

#nsk-khata-app {
    max-width: 900px;
    margin: 20px auto;
    font-family: 'Segoe UI', 'Noto Sans Telugu', Arial, sans-serif;
    background: linear-gradient(180deg, #fffaf0 0%, #fff3d9 100%);
    border: 2px solid #e6b400;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 24px rgba(230, 126, 0, 0.18);
}

.nsk-khata-header { text-align: center; margin-bottom: 16px; position: relative; }
.nsk-page-logout-btn {
    position: absolute; top: 0; right: 0;
    background: #c0392b; color: #fff; border: none; border-radius: 8px;
    padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.nsk-page-logout-btn:hover { filter: brightness(1.1); }
.nsk-khata-header h2 {
    margin: 0 0 6px;
    color: #b34700;
    letter-spacing: 2px;
    font-size: 26px;
    text-shadow: 1px 1px 0 #fff3d0;
}
.nsk-khata-sub { color: #8a4b00; font-weight: 600; font-size: 14px; }
.nsk-khata-sub2 { color: #a35a00; font-size: 13px; margin-top: 2px; }

/* Stat boxes */
.nsk-khata-stats, .nsk-admin-stats {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin: 16px 0;
}
.nsk-stat-box {
    flex: 1 1 140px;
    background: #fff;
    border: 1px solid #f0c674;
    border-radius: 10px;
    padding: 10px 14px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.nsk-stat-box .lbl { display: block; font-size: 11px; color: #a06a00; font-weight: 600; }
.nsk-stat-box .val { display: block; font-size: 20px; font-weight: 800; color: #b34700; margin-top: 4px; }
.nsk-stat-box.balance .val { color: #c0392b; }

/* Main buttons */
.nsk-khata-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.nsk-btn {
    flex: 1 1 200px;
    padding: 16px 10px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.nsk-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 16px rgba(0,0,0,0.22); }
.nsk-btn:active { transform: translateY(0) scale(0.98); }
.nsk-btn-admin   { background: linear-gradient(135deg, #6a3d9a, #8e5cd9); }
.nsk-btn-credit  { background: linear-gradient(135deg, #d35400, #f39c12); }
.nsk-btn-payment { background: linear-gradient(135deg, #1e8449, #27ae60); }
.nsk-btn.active-view { outline: 3px solid #ffd700; }

/* Cards */
.nsk-card {
    background: #fffdf7;
    border: 1px solid #f2d38a;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.nsk-card h3 { margin: 0 0 14px; color: #a3400a; font-size: 18px; border-bottom: 2px solid #f6d98a; padding-bottom: 8px; }
.nsk-card h4 { margin: 20px 0 10px; color: #7a3b00; font-size: 15px; }

.nsk-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.nsk-field { flex: 1 1 200px; display: flex; flex-direction: column; }
.nsk-field label { font-size: 12px; font-weight: 700; color: #8a5300; margin-bottom: 5px; }
.nsk-field input, .nsk-field select {
    padding: 10px 12px;
    border: 1.5px solid #e8c877;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}
.nsk-field input:focus, .nsk-field select:focus { outline: none; border-color: #d35400; }

/* Item rows (credit entry) */
.nsk-item-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.nsk-item-row .item-name { flex: 2; padding: 9px 10px; border: 1.5px solid #e8c877; border-radius: 8px; }
.nsk-item-row .item-cost { flex: 1; padding: 9px 10px; border: 1.5px solid #e8c877; border-radius: 8px; }
.nsk-remove-item {
    background: #e74c3c; color: #fff; border: none; border-radius: 6px;
    width: 32px; height: 32px; cursor: pointer; font-weight: 700;
}
.nsk-btn-add-item {
    background: #f39c12; color: #fff; border: none; border-radius: 8px;
    padding: 8px 16px; cursor: pointer; font-weight: 700; margin-top: 4px;
}

.nsk-total-row {
    display: flex; justify-content: space-between; align-items: center;
    background: #fef3d0; border-radius: 8px; padding: 12px 16px;
    margin: 14px 0; font-weight: 800; font-size: 18px; color: #b34700;
}

.nsk-submit-btn {
    width: 100%; padding: 14px; font-size: 17px; font-weight: 800;
    background: linear-gradient(135deg, #d35400, #e67e22);
    color: #fff; border: none; border-radius: 10px; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.nsk-submit-btn:hover { filter: brightness(1.08); }

.nsk-msg { margin-top: 10px; font-weight: 600; font-size: 14px; min-height: 18px; }
.nsk-msg.success { color: #1e8449; }
.nsk-msg.error { color: #c0392b; }

/* Tables */
.nsk-table-scroll { overflow-x: auto; }
.nsk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nsk-table th, .nsk-table td {
    padding: 9px 10px; text-align: left; border-bottom: 1px solid #f0dca0;
    word-break: break-word; font-size: 13px;
}
.nsk-table th { background: #fbe6b0; color: #7a3b00; font-weight: 700; }
.nsk-table tr:hover { background: #fffaf0; }

.status-pill { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; }
.status-pill.approved { background: #27ae60; }
.status-pill.pending { background: #e67e22; }
.status-pill.rejected { background: #c0392b; }

/* Admin */
.nsk-admin-topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.nsk-filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nsk-filter-btn {
    padding: 6px 14px; border: 1.5px solid #e8c877; background: #fff;
    border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 700; color: #8a5300;
}
.nsk-filter-btn.active { background: #d35400; color: #fff; border-color: #d35400; }
#admin-search { padding: 6px 12px; border: 1.5px solid #e8c877; border-radius: 20px; font-size: 12px; }
.nsk-logout-btn {
    background: #c0392b; color: #fff; border: none; border-radius: 8px;
    padding: 8px 18px; font-weight: 700; cursor: pointer;
}

.nsk-bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; font-size: 13px; }
.nsk-bulk-btn { border: none; border-radius: 6px; padding: 6px 12px; cursor: pointer; color: #fff; font-weight: 700; font-size: 12px; }
.nsk-bulk-btn.approve { background: #27ae60; }
.nsk-bulk-btn.reject { background: #e67e22; }
.nsk-bulk-btn.delete { background: #c0392b; }
.nsk-selcount { color: #8a5300; font-weight: 600; }

.row-edit-btn, .row-approve-btn, .row-delete-btn {
    border: none; border-radius: 6px; padding: 5px 10px; margin: 2px;
    color: #fff; font-weight: 700; cursor: pointer; font-size: 11px;
}
.row-approve-btn { background: #27ae60; }
.row-edit-btn { background: #e67e22; }
.row-delete-btn { background: #c0392b; }

.inline-edit-strip { display: flex; gap: 6px; align-items: center; }
.inline-edit-strip input { width: 90px; padding: 4px 6px; border: 1px solid #e8c877; border-radius: 5px; }

#balance-chart-wrap { background: #fff; border-radius: 10px; padding: 10px; }

@media (max-width: 640px) {
    #nsk-khata-app { padding: 12px; margin: 10px; }
    .nsk-khata-header h2 { font-size: 21px; }
    .nsk-btn { font-size: 14px; padding: 14px 8px; }
    .nsk-admin-topbar { flex-direction: column; align-items: stretch; }
    .nsk-page-logout-btn { position: static; display: inline-block; margin-bottom: 10px; }
}
