/* RESET */
body {
    margin: 0;
    font-family: Arial;
    background: #f5f7fb;
}

/* SIDEBAR */
.sidebar {
    position: fixed;        /* IMPORTANT */
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;          /* full screen height */
    
    display: flex;
    flex-direction: column;

    background: #0b2a5b;
    padding: 10px;
}

.sidebar-title {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 18px;
    border-bottom: 1px solid #2c5aa0;
    padding-bottom: 10px;
}

.sidebar button {
    width: 90%;
    margin: 7px;
    padding: 12px;
    border: 1px solid #f4f5f7;
    background: #123d82;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.sidebar button.active {
    background: #28a745;
}

.sidebar button:hover {
    background: #1f5edc;
}

/* MAIN CONTENT (ONLY THIS) */
.panelScreen {
    margin-left: 240px;
    padding: 20px;
    background: #f4f6fb;
    min-height: 100vh;
}

/* FORM */
.form-section {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* INPUTS */
input,
select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* BUTTON */
button {
    padding: 10px 20px;
    background: #0b2a5b;
    color: white;
    border: none;
    border-radius: 5px;
}

button.active {
    background: #0b5ed7;
}

label {
    font-weight: bold;
    /* 🔥 makes it bold */
    margin-bottom: 5px;
}

h3 {
    font-weight: 600;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* Header */
th {
    background: #0b2a5b;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

/* Rows */
td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* Zebra striping */
tr:nth-child(even) {
    background: #f9fbff;
}

/* Hover effect */
tr:hover {
    background: #eef3ff;
}

.action-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 5px;
    margin-right: 5px;
    cursor: pointer;
}

/* Edit */
.btn-edit {
    background: #0b5ed7;
    color: white;
}

/* Delete */
.btn-delete {
    background: #dc3545;
    color: white;
}

#search {
    padding: 8px 12px;
    width: 250px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
}

.dashboard {
    margin-left: 240px;
    padding: 20px;
}

.cards {
    display: flex;
    gap: 20px;
}

.card {
    flex: 1;          /* ✅ equal width */
    min-width: 0;
    text-align: center;
}
.card h3 {
    
    color: #111827;
}

.card h4 {
    color: #111827;
}

.card h2 {
    font-size: 30px;
    font-weight: 600;
}

.card.blue,
.card.green,
.card.purple,
.card.red {
    background: #ffffff;                /* clean white */
    border: 1px solid #e5e7eb;          /* soft border */
    border-left: 5px solid #2563eb;     /* primary highlight */
    color: #111827;
}

.card:hover {
    transform: translateY(-5px);
    transition: 0.3s;
}

.dashboardRow {
    display: flex;
    gap: 15px;
}

.box {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

table {
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

@media (max-width: 1000px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.panelScreen h2,
.panelScreen h3 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #0b2a5b;
}

button.primary {
    background: #0b2a5b;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
}

button.primary:hover {
    background: #174ea6;
}

.tag {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.active {
    background: #d4edda;
    color: #155724;
}

.inactive {
    background: #f8d7da;
    color: #721c24;
}

.box {
    margin-top: 20px;
    padding: 20px;
}

#categoryChart {
    max-height: 400px !important;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-section {
    padding: 15px;
    /* 🔥 reduced */
    margin-bottom: 10px;
    /* 🔥 reduced */
}

.row {
    margin-bottom: 6px;
    /* 🔥 reduced */
}

input,
select {
    padding: 6px;
    /* 🔥 smaller inputs */
    font-size: 13px;
}

h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.form-section {
    padding: 10px;
    /* reduce from 20 */
    margin-bottom: 8px;
    /* reduce gap */
}

.row {
    margin-bottom: 6px;
    /* tighter spacing */
}

input,
select {
    padding: 6px;
    font-size: 13px;
}

label {
    font-size: 13px;
    margin-bottom: 3px;
}

h3 {
    font-size: 15px;
    margin-bottom: 10px;
}

.btn-import {
    background: #17a2b8;
    color: white;
    margin-right: 8px;
}

.btn-export {
    background: #28a745;
    color: white;
}

.btn-import:hover {
    background: #138496;
}

.btn-export:hover {
    background: #218838;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-info {
    color: white;
    text-align: center;
    margin-top: auto;
    margin-bottom: 50px;
    font-weight: 600;
    background: #1f4ea3;
    padding: 8px;
    border-radius: 5px;
}

.logout-btn {
    position: absolute;
    bottom: 20px;
    left: 3px;
    right: 20px;

    background: #e74c3c !important;   /* FORCE RED */
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c0392b !important;   /* darker red */
}
/* PAGE */
.dcPage {
    padding: 15px;
}

/* FORM (TOP) */
.dcForm {
    background: #fff;
    padding: 85px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}
.dcForm {
    margin-top: 0;        /* remove extra gap */
    padding-top: 10px;    /* reduce inner spacing */
}
.dcForm h2 {
    margin-top: 0;        /* 🔥 IMPORTANT */
    margin-bottom: 10px;
}

.dcListContainer h3 {
    margin-top: 0;        /* 🔥 IMPORTANT */
    margin-bottom: 10px;
}

/* LIST (BOTTOM) */
.dcListContainer {
    background: #fff;
    padding: 65px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* SCROLL ONLY INSIDE TABLE */
.dcListScroll {
    max-height: 450px;   /* 🔥 control height here */
    overflow-y: auto;
    margin-top: 10px;
}
#dcTable {
    width: 100%;
    border-collapse: collapse;
}

#dcTable th {
    background: #0b2a5b;
    color: white;
    padding: 10px;
    position: sticky;
    top: 0;
}

#dcTable td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.form-row {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-row.four {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.form-row.one {
    grid-template-columns: 1fr;
}

.dcHeader {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

/* LEFT SIDE */
.leftBox {
    width: 40%;
    display: flex;
    flex-direction: column;
}

/* RIGHT SIDE */
.rightBox {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 🔥 moves to right */
}

/* INPUT WIDTH CONTROL */
.leftBox input,
.rightBox input {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
}

/* LABEL STYLE */
.dcHeader label {
    font-weight: bold;
    font-size: 13px;
}
.rightBox input {
    text-align: right;
}
.assetRow {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 60px;
    gap: 10px;
    margin-bottom: 10px;
}
#issuedByAddress {
    width: 100%;
    height: 60px;
    padding: 8px;
    resize: none;
}

td:nth-child(13) {   /* Status column */
    white-space: nowrap;
}
td:last-child {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.cancelled-row {
    background-color: #ffe5e5; /* light red */
    color: #a94442;
}

.cancelled-row td {
    text-decoration: line-through;
}
.user-info {
    background: #ffffff;        /* ✅ white background */
    color: #0b2a5b;
    margin-top: 185px;
    margin-bottom: 10px;
    padding: 6px 6px;
    border-radius: 100px;
    width: 130px;
    margin-left:25px ;
}
.user-info b {
    display: block;
    font-size: 15px;
    font-weight: bold;
    margin-top: 4px;
}
.row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.col {
    flex: 1;
}

.card {
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    text-align: center;
}

.red { background: #dc3545; }
.yellow { background: #ffc107; color: black; }
.blue { background: #17a2b8; }
.black { background: #343a40; }

.alert-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.alert-card {
    flex: 1;
    min-width: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.alert-card:hover {
    transform: translateY(-3px);
}

/* DOT */
.alert-card .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* TEXT */
.alert-card h3 {
    margin: 0;
    font-size: 22px;
}

.alert-card p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* COLORS */

.overdue {
    border-left: 5px solid #e74c3c;
}
.overdue .dot {
    background: #e74c3c;
}

.today {
    border-left: 5px solid #f1c40f;
}
.today .dot {
    background: #f1c40f;
}

.upcoming {
    border-left: 5px solid #3498db;
}
.upcoming .dot {
    background: #3498db;
}

.amc {
    border-left: 5px solid #2c3e50;
}
.amc .dot {
    background: #2c3e50;
}

.dashboard-top {
       margin-bottom: 20px;   /* 🔥 gap */
}

.maintenance-section {
    margin-top: 40px;
}
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: #2c3e50;
    text-align: center;   /* 🔥 THIS FIXES */
}
.toast {
    position: fixed;
    top: 30px;
    right: 30px;

    min-width: 280px;        /* 🔥 bigger width */
    max-width: 350px;

    background: #2c3e50;
    color: white;

    padding: 16px 22px;      /* 🔥 more spacing */
    font-size: 15px;         /* 🔥 bigger text */
    font-weight: 500;

    border-radius: 10px;
    display: none;

    box-shadow: 0 10px 25px rgba(0,0,0,0.25);

    animation: slideIn 0.4s ease;
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.warning { background: #f39c12; }
.toast.danger  { background: #e74c3c; }
.toast.success { background: #27ae60; }
.toast.info    { background: #3498db; }

.big-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    background: #e74c3c; /* red alert */
    color: white;

    text-align: center;
    padding: 15px;

    font-size: 18px;
    font-weight: bold;

    display: none;
    z-index: 9999;

    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.amc-overdue {
    border-left: 5px solid #e74c3c;
}
.amc-overdue .dot {
    background: #e74c3c;
}

.amc-today {
    border-left: 5px solid #f39c12;
}
.amc-today .dot {
    background: #f39c12;
}

.amc-upcoming {
    border-left: 5px solid #2980b9;
}
.amc-upcoming .dot {
    background: #2980b9;
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 equal boxes */
    gap: 15px;
    margin-top: 10px;
}

.alert-box {
    background: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    min-width: 0; /* prevent overflow */
}

.alert-box h3 {
    font-size: 26px;   /* increase size */
    font-weight: 700;  /* bold */
    margin: 0;
    color: #2c3e50;
}

.alert-box p {
    font-size: 14px;   /* slightly bigger */
    font-weight: 600;  /* semi-bold */
    margin: 0;
    color: #555;
}
.alerts-grid {
    grid-template-columns: repeat(3, 1fr);
}
.alert-box {
    display: flex;
    flex-direction: column;   /* stack number + text */
    justify-content: center;  /* vertical center */
    align-items: center;      /* horizontal center */
    text-align: center;
}

.bill-alert-container {
    display: flex;
    gap: 12px;          /* 👈 space between TEST 3 & TEST */
    flex-wrap: wrap;    /* optional: wrap to next line if needed */
}

/* CARD STYLE */
.bill-card {
    display: inline-flex;   /* ✅ key change */
    align-items: center;
    gap: 10px;

    padding: 30px 34px;
    margin-bottom: 10px;

    border-radius: 8px;
    background: #fbf8f8;
    border-left: 4px solid;

    box-shadow: 0 2px 5px rgba(0,0,0,0.05);

    width: fit-content;     /* ✅ shrink to content */
    max-width: 100%;        /* safety */
}

.bill-card:hover {
    transform: translateY(-2px);
}

/* DOT */
.bill-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* COLORS */
.bill-overdue {
    border-color: #e74c3c;
}
.bill-overdue .bill-dot {
    background: #e74c3c;
}

.bill-today {
    border-color: #f1c40f;
}
.bill-today .bill-dot {
    background: #f1c40f;
}

.bill-upcoming {
    border-color: #2ecc71;
}
.bill-upcoming .bill-dot {
    background: #2ecc71;
}

/* TEXT */
.bill-text {
    display: flex;
    flex-direction: column;
}

.bill-text span {
    font-size: 13px;
    color: #555;
}

.bill-text small {
    font-size: 18px;
    color: #4f0af1;
}
.bill-section h3 {
    font-size: 20px;       /* match Maintenance Alerts */
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
}
/* 🔴 RED */
.bill-dot.red {
    width: 14px;
    height: 14px;
    background: #e74c3c;
    border-radius: 50%;
}

/* 🟡 YELLOW */
.bill-dot.yellow {
    width: 14px;
    height: 14px;
    background: #f1c40f;
    border-radius: 50%;
}

/* 🟢 GREEN (MISSING FIX) */
.bill-dot.green {
    width: 14px;
    height: 14px;
    background: #2ecc71;   /* ✅ THIS FIX */
    border-radius: 50%;
}
.bill-section {
    margin-top: 35px;   /* ⬅ increase gap from Maintenance Alerts */
}

.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* INPUT + SELECT SAME STYLE */
.filter-bar input,
.filter-bar select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    min-width: 180px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

/* FOCUS EFFECT */
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

/* CLEAR BUTTON */
.clear-btn {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.clear-btn:hover {
    background: #e60000;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

#pagination button {
    border: none;
    background: transparent;
    padding: 6px 12px;
    margin: 3px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    color: #555;
    transition: 0.2s;
}

/* 🔥 ACTIVE PAGE (IMPORTANT) */
#pagination button.active {
    background: #007bff;   /* strong blue */
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 🔥 HOVER EFFECT */
#pagination button:hover {
    background: #e6f0ff;
    color: #007bff;
}
