/* ============================================
   ANTIM NIWAS - Custom Stylesheet
   ============================================ */

:root {
    --maroon:        #7b1c2e;
    --maroon-dark:   #5a1220;
    --maroon-light:  #a63246;
    --saffron:       #ff9933;
    --bg-light:      #f8f5f2;
    --text-main:     #2c2c2c;
    --border-color:  #dee2e6;
}

/* ---- Base ---- */
body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.92rem;
}

/* ---- Navbar ---- */
.bg-maroon {
    background-color: var(--maroon) !important;
}
.navbar-brand {
    font-size: 1rem;
    letter-spacing: 0.3px;
}
.nav-link.active {
    color: var(--saffron) !important;
    font-weight: 600;
}
.nav-link:hover {
    color: #ffd699 !important;
}

/* ---- Cards ---- */
.card {
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-radius: 8px;
}
.card-header {
    background-color: var(--maroon);
    color: #fff;
    font-weight: 600;
    border-radius: 8px 8px 0 0 !important;
    padding: 0.65rem 1rem;
}
.card-header .bi { margin-right: 6px; }

/* ---- Stats Cards (Dashboard) ---- */
.stat-card {
    border-left: 4px solid var(--maroon);
    background: #fff;
    border-radius: 8px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--maroon);
    opacity: 0.8;
}
.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--maroon-dark);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Buttons ---- */
.btn-maroon {
    background-color: var(--maroon);
    color: #fff;
    border: none;
}
.btn-maroon:hover {
    background-color: var(--maroon-dark);
    color: #fff;
}
.btn-saffron {
    background-color: var(--saffron);
    color: #fff;
    border: none;
}
.btn-saffron:hover {
    background-color: #e68a00;
    color: #fff;
}

/* ---- Tables ---- */
.table thead th {
    background-color: var(--maroon);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
    vertical-align: middle;
}
.table tbody tr:hover {
    background-color: #fdf3f5;
}
.table td {
    vertical-align: middle;
    font-size: 0.85rem;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(123,28,46,0.03);
}

/* ---- Action buttons in table ---- */
.btn-action {
    padding: 2px 8px;
    font-size: 0.78rem;
    border-radius: 4px;
    margin: 1px;
}

/* ---- Badges ---- */
.badge-wood  { background-color: #6d4c41; color: #fff; }
.badge-cng   { background-color: #1565c0; color: #fff; }
.bg-pink     { background-color: #e91e63 !important; color: #fff; }

/* ---- Maroon utility classes ---- */
.text-maroon { color: var(--maroon) !important; }
.table-maroon th {
    background-color: var(--maroon) !important;
    color: #fff !important;
}
.btn-outline-maroon {
    border: 1px solid var(--maroon);
    color: var(--maroon);
    background: transparent;
}
.btn-outline-maroon:hover {
    background-color: var(--maroon);
    color: #fff;
}

/* ---- Modal ---- */
.modal-header {
    background-color: var(--maroon);
    color: #fff;
}
.modal-header .btn-close {
    filter: invert(1);
}
.modal-title { font-weight: 600; }

/* ---- Detail rows inside modal ---- */
.detail-row {
    display: flex;
    padding: 5px 0;
    border-bottom: 1px solid #f0e8ea;
}
.detail-label {
    flex: 0 0 45%;
    font-weight: 600;
    color: var(--maroon-dark);
    font-size: 0.82rem;
}
.detail-value {
    flex: 1;
    font-size: 0.85rem;
    color: #333;
}

/* ---- Log entries ---- */
.log-entry {
    background: #fff8f0;
    border-left: 3px solid var(--saffron);
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 0 4px 4px 0;
    font-size: 0.82rem;
}
.log-entry .log-meta {
    color: #888;
    font-size: 0.75rem;
}

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.login-header {
    background-color: var(--maroon-dark);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}
.login-header .login-icon {
    font-size: 2.5rem;
    color: var(--saffron);
}
.login-header h4 {
    margin: 0.5rem 0 0.2rem;
    font-weight: 700;
}
.login-header p {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

/* ---- Footer ---- */
.footer-bar {
    background-color: #f0ebe8;
    border-top: 1px solid var(--border-color);
}

/* ---- Responsive adjustments ---- */
@media (max-width: 768px) {
    .stat-card { margin-bottom: 0.8rem; }
    .table-responsive { font-size: 0.78rem; }
    .navbar-brand span { display: none; }
}

/* ---- DataTables custom ---- */
div.dataTables_wrapper div.dataTables_filter input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px 8px;
}
div.dataTables_wrapper div.dataTables_length select {
    border: 1px solid #ccc;
    border-radius: 4px;
}
table.dataTable thead th, table.dataTable thead td {
    border-bottom: 2px solid var(--maroon-dark) !important;
}

/* ---- Editable field highlight ---- */
.field-editable {
    border-bottom: 1px dashed var(--maroon-light);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.15s;
}
.field-editable:hover {
    background-color: #fdf3f5;
}

/* ---- Amount fields ---- */
.amount-field {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}
.total-row td {
    font-weight: 700;
    background-color: #fef9e7 !important;
    border-top: 2px solid var(--saffron) !important;
}
