<style>
/* Base Styles for Layout */
body {
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--bg-main, #001f3f);
    margin: 0;
    color: var(--text-main);
}

/* ============= LAYOUT + TOPBAR (UNIFORM) ============= */
.content-wrapper {
    margin-left: 260px; /* space for admin sidebar */
    padding: 24px 26px 32px;
    min-height: 100vh;
    box-sizing: border-box;
    background: radial-gradient(circle at top left, rgba(0,255,239,0.08), transparent 55%), var(--bg-main, #001f3f);
    transition: margin-left 0.3s ease, background 0.3s ease;
}

.content-wrapper.fullwidth {
    margin-left: 0;
}

.content-inner {
    max-width: 1600px;
    margin: 0 auto;
}

.topbar {
    background: var(--bg-sidebar);
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #B8860B;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    color: brown;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.topbar-title {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.03em;
}

.menu-btn {
    font-size: 22px;
    cursor: pointer;
    color: var(--accent-gold, #f4b400);
    transition: 0.3s;
    line-height: 1;
}

.menu-btn:hover {
    color: #e6c34b;
}

.theme-toggle {
    border-radius: 999px;
    border: 1px solid rgba(184,134,11,0.7);
    padding: 6px 12px;
    background: rgba(0,0,0,0.4);
    color: #f9f9f9;
    font-size: 12px;
    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(0,0,0,0.65);
}

.topbar-user strong {
    font-weight: 600;
}

/* Sidebar hide on toggle */
#sidebar.hidden {
    transform: translateX(-260px);
}

@media (max-width: 900px) {
    .content-wrapper {
        margin-left: 0;
        padding: 18px 16px 24px;
    }
}

@media (max-width: 768px){
    .content-wrapper {
        padding: 18px 14px 24px;
    }
}

/* ============= PAGE CONTENT STYLES ============= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-heading);
}

.page-subtitle {
    font-size: 13px;
    color: #f4b400;
    margin-top: 4px;
}

.page-card,
.page-card-table {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    border: 1px solid #0a4a85;
    color: var(--text-main);
    margin-bottom: 20px;
}

body[data-theme="light"] .page-card,
body[data-theme="light"] .page-card-table {
    box-shadow: 0 12px 30px rgba(15,23,42,0.12);
    border-color: rgba(148,163,184,0.55);
}

.page-card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-heading);
}

.expense-form {
    margin-top: 8px;
    max-width: 520px;
}

.expense-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.expense-form input[type="text"],
.expense-form input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.55);
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 14px;
    margin-bottom: 15px;
}

.expense-form input::placeholder {
    color: #9ca3af;
}

.expense-form input[type="text"]:focus,
.expense-form input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 1px rgba(244,180,0,0.35);
}

.btn-primary {
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: var(--accent-gold);
    color: #111827;
    margin-top: 4px;
}

.btn-primary:hover {
    background: var(--accent-gold-soft);
}

.alert {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    border-left-width: 4px;
    border-left-style: solid;
}

.alert-success {
    background: rgba(34,197,94,0.12);
    border-left-color: rgba(34,197,94,0.9);
    color: #bbf7d0;
}

.alert-error {
    background: rgba(239,68,68,0.14);
    border-left-color: rgba(248,113,113,0.95);
    color: #fecaca;
}

body[data-theme="light"] .alert-success {
    background: #dcfce7;
    border-left-color: #16a34a;
    color: #166534;
}

body[data-theme="light"] .alert-error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

/* table styles */
.pos-table-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pos-table-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.pos-table-header p {
    font-size: 12px;
    color: #c3d8ff;
    margin-top: 2px;
}

body[data-theme="light"] .pos-table-header p {
    color: #4b5563;
}

.pos-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.entries-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.entries-form label {
    color: #c3d8ff;
}

body[data-theme="light"] .entries-form label {
    color: #4b5563;
}

.entries-form select {
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 13px;
}

.badge-muted {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15,23,42,0.86);
    color: #c3d8ff;
}

body[data-theme="light"] .badge-muted {
    background: #e5f3ff;
    color: #0f172a;
}

.date-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    font-size: 12px;
}

.date-filter-form span {
    color: #c3d8ff;
}

body[data-theme="light"] .date-filter-form span {
    color: #4b5563;
}

.date-filter-form input[type="date"] {
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 12px;
}

.date-filter-form button,
.date-filter-form a.clear-btn {
    padding: 6px 11px;
    border-radius: 999px;
    border: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.date-filter-form button {
    background: var(--accent-gold);
    color: #111827;
}

.date-filter-form button:hover {
    background: var(--accent-gold-soft);
}

.date-filter-form a.clear-btn {
    border: 1px solid rgba(148,163,184,0.7);
    background: transparent;
    color: var(--text-main);
}

/* table wrapper */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 6px;
}

table.pos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 850px;
}

.pos-table th,
.pos-table td {
    padding: 9px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(148,163,184,0.25);
}

.pos-table th {
    background: var(--bg-table-head);
    color: #ffffff;
    font-weight: 600;
}

.pos-table tbody tr {
    background: var(--bg-table-row);
}

.pos-table tbody tr:nth-child(even) {
    background: var(--bg-table-row);
}

.pos-table tbody tr:hover {
    background: var(--bg-table-hover);
    color: #ffffff;
}

body[data-theme="light"] .pos-table th {
    color: #111827;
    border-bottom-color: rgba(148,163,184,0.5);
}

body[data-theme="light"] .pos-table td {
    border-bottom-color: rgba(148,163,184,0.35);
}

.cell-left { text-align: left; }

.empty-row {
    padding: 18px;
    color: #c3d8ff;
    text-align: center;
}

.delete-btn,
.edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 999px;
    text-decoration: none;
    margin: 2px;
}

/* delete button */
.delete-btn {
    border: 1px solid rgba(239,68,68,0.8);
    background: rgba(239,68,68,0.16);
    color: #fecaca;
}

.delete-btn:hover {
    background: rgba(239,68,68,0.3);
}

/* edit button */
.edit-btn {
    border: 1px solid rgba(59,130,246,0.8);
    background: rgba(59,130,246,0.16);
    color: #bfdbfe;
}

.edit-btn:hover {
    background: rgba(59,130,246,0.3);
}

body[data-theme="light"] .delete-btn {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
}

body[data-theme="light"] .edit-btn {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.totals-row {
    background: rgba(15,23,42,0.9);
    font-weight: 600;
}

body[data-theme="light"] .totals-row {
    background: #e5f3ff;
}

.pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.page-btn {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: var(--bg-input);
    color: var(--text-main);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.page-btn:hover {
    background: var(--bg-table-hover);
    color: #ffffff;
}

.page-btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #111827;
    font-weight: 700;
}

footer {
    background: transparent;
}
</style>