/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-primary: #1b5e20;
    --green-hover: #0d3d18;
    --green-light: #dcfce7;
    --green-bg: #f0fdf4;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green-bg) 0%, var(--white) 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 48px;
    color: var(--green-primary);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.password-wrapper input {
    width: 100%;
    padding: 12px;
    padding-left: 45px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.password-wrapper input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.password-toggle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 18px;
    padding: 0 12px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: auto;
}

.password-toggle:hover {
    color: var(--green-primary);
}

.password-toggle:active {
    opacity: 0.7;
}

.login-hint {
    margin-top: 20px;
    padding: 16px;
    background: var(--green-bg);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray-700);
}

.login-hint p {
    margin: 4px 0;
}

.error-message {
    margin-top: 12px;
    padding: 12px;
    background: #fee2e2;
    color: var(--red-600);
    border-radius: 6px;
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--green-primary);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--green-hover);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

.btn-success {
    background: var(--green-primary);
    color: var(--white);
}

.btn-danger {
    background: var(--red-600);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--red-500);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-600);
    font-size: 20px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--gray-100);
}

/* Header */
.header {
    display: none;
}

.header-left {
    display: none;
}

.app-container {
    display: flex;
    margin-top: 0;
    height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: rgb(69, 95, 69);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    transition: transform 0.3s;
}

.main-content {
    margin-left: 260px;
    padding: 20px;
}

.header-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

#page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    
}

#user-name {
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

/* App Container */
.app-container {
    display: flex;
    margin-top: 0;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgb(69, 95, 69);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    transition: transform 0.3s;
    
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid var(--gray-200);
}

#menu-toggle {
    margin-left: auto;
    background: transparent;
    border: 1px solid white;
    color: white;
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--green-bg);
    color: var(--green-primary);
}

.nav-link.active {
    background: var(--green-light);
    color: var(--green-primary);
    font-weight: 500;
    border-right: 3px solid var(--green-primary);
}

.nav-link i {
    font-size: 18px;
    width: 24px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--gray-50);
}

.text-2xl {
    font-size: 2rem;
    line-height: 1.2;
}

.font-semibold {
    font-weight: 600;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-sm {
    font-size: 0.95rem;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.dashboard-intro {
    background: linear-gradient(180deg, rgba(236,253,245,0.75), #ffffff);
    border: 1px solid rgba(16,185,129,0.16);
    border-radius: 22px;
    padding: 28px 28px 24px;
    margin-bottom: 24px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.06);
}

.dashboard-intro h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.dashboard-intro p {
    color: var(--gray-600);
    max-width: 720px;
    line-height: 1.7;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.1);
}

.card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.vendor-card-header {
    flex-wrap: nowrap;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.card-description {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.card-content {
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stalls-stats-grid {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
}

.stat-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f7fdf6 100%);
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(16, 185, 129, 0.16);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    top: -35px;
    right: -35px;
    background: rgba(16, 185, 129, 0.12);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-description {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.55;
}

/* Stall Cards */
.stall-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stall-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stall-card .stall-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.stall-card .stall-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.stall-card .stall-location {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.stall-card .stall-size {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.stall-card .stall-rate {
    font-size: 14px;
    font-weight: 500;
    color: var(--green-primary);
}

.stalls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-green {
    background: var(--green-light);
    color: var(--green-primary);
}

.badge-red {
    background: #fee2e2;
    color: var(--red-600);
}

.badge-blue {
    background: #dbeafe;
    color: var(--blue-600);
}

.badge-amber {
    background: #fef3c7;
    color: var(--amber-600);
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Table */
.table-container {
    overflow-x: auto;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 16px;
    box-shadow: inset 0 0 0 1px rgba(243, 244, 246, 0.9);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

thead {
    background: var(--gray-50);
}

th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

tr:hover {
    background: rgba(237, 242, 247, 0.7);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.proof-viewer {
    display: grid;
    gap: 20px;
}

.proof-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.proof-meta-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.proof-meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.proof-screenshot-card {
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 18px;
    padding: 20px;
    display: grid;
    gap: 18px;
}

.proof-screenshot-header {
    display: flex;
    gap: 14px;
    align-items: center;
}

.gcash-logo {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #00ba5a 0%, #00e676 100%);
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
}

.proof-screenshot-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.proof-screenshot-subtitle {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.proof-screenshot-body {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.proof-screenshot-text {
    font-size: 0.95rem;
    color: var(--gray-700);
    display: flex;
    justify-content: space-between;
}

.proof-qrcode {
    width: 100%;
    min-height: 140px;
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(31, 41, 55, 0.2) 0%, rgba(31, 41, 55, 0.05) 60%), linear-gradient(135deg, #f8fbff 0%, #e6f5ff 100%);
    box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.05);
}

.proof-screenshot-note {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    background: var(--white);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--green-primary);
}

.toast.error {
    border-left: 4px solid var(--red-600);
}

.toast.info {
    border-left: 4px solid var(--blue-600);
}

/* Chat Interface */
.chat-container {
    display: flex;
    height: 600px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.chat-sidebar {
    width: 33.333%;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.chat-search {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.chat-search input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    left: 28px;
    top: 28px;
    color: var(--gray-400);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: var(--gray-50);
}

.conversation-item.active {
    background: var(--green-bg);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.conversation-vendor {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900);
}

.conversation-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.conversation-preview {
    font-size: 13px;
    color: var(--gray-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.conversation-time {
    font-size: 11px;
    color: var(--gray-400);
}

.unread-badge {
    background: var(--green-primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--gray-50);
}

.message {
    margin-bottom: 16px;
    display: flex;
}

.message.vendor {
    justify-content: flex-start;
}

.message.admin {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.vendor .message-bubble {
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.message.admin .message-bubble {
    background: var(--green-primary);
    color: var(--white);
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    margin-top: 6px;
    opacity: 0.7;
}

.chat-input {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    background: var(--white);
}

.chat-input input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.chat-input button {
    padding: 10px 20px;
}

.chat-resolved {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    background: var(--gray-50);
    color: var(--gray-500);
    font-size: 14px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
}

/* Tabs */
.tabs {
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 20px;
}

.tab-list {
    display: flex;
    gap: 8px;
    list-style: none;
}

.tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--gray-900);
}

.tab-button.active {
    color: var(--green-primary);
    border-bottom-color: var(--green-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Online Payment Design */
.onlinepayment-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.onlinepayment-header p {
    color: var(--gray-600);
    margin-bottom: 18px;
}

.onlinepayment-summaries {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 18px;
}

.onlinepayment-summary-card {
    background: linear-gradient(135deg, rgba(22,163,74,0.08), var(--white));
    border: 1px solid rgba(22,163,74,0.2);
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(15,23,42,0.05);
}

.onlinepayment-summary-card .label {
    font-size: 12px;
    color: var(--gray-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.onlinepayment-summary-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--green-primary);
}

.onlinepayment-filter-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.onlinepayment-receipt-list {
    display: grid;
    gap: 18px;
}

.onlinepayment-receipt {
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 8px 20px rgba(15,23,42,0.06);
    padding: 20px;
}

.onlinepayment-receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.onlinepayment-receipt-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.onlinepayment-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--green-primary);
    margin-bottom: 14px;
}

.onlinepayment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    gap: 12px;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 0;
    margin-bottom: 14px;
}

.onlinepayment-meta-item {
    flex: 1 1 180px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.onlinepayment-meta-item .key {
    display: block;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.onlinepayment-receipt-status {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 999px;
}

.status-pending {
    background: #fff7e0;
    color: #b7790b;
}

.status-approved {
    background: #ecfdf5;
    color: #166534;
}

.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.onlinepayment-actions {
    display: flex;
    gap: 10px;
    margin-left: 8px;
    margin-top: 8px;
    margin-bottom: 2px;
    justify-content: flex-start;
}

.onlinepayment-receipt:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15,23,42,0.14);
}

.onlinepayment-proof-image {
    width: 100%;
    max-width: 560px;
    border-radius: 18px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 12px 28px rgba(15,23,42,0.08);
    margin-bottom: 16px;
}

.onlinepayment-receipt-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--green-primary);
}

.onlinepayment-receipt-status {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
}

.onlinepayment-status-pending {
    background: #fff7e0;
    color: #b7790b;
}

.onlinepayment-status-approved {
    background: #ecfdf5;
    color: #166534;
}

.badge-addon {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 65px;
        height: calc(100vh - 65px);
        z-index: 90;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chat-container {
        flex-direction: column;
        height: auto;
    }

    .chat-sidebar {
        width: 100%;
        max-height: 300px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }
}

/* Utility Classes */
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.font-semibold { font-weight: 600; }
.text-gray-600 { color: var(--gray-600); }
.text-gray-500 { color: var(--gray-500); }

/* RBAC Page: stats cards + content layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.stat-card .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: white;
}

.stat-card .stat-info h4 {
    margin: 0;
    font-size: 20px;
}

.stat-card .stat-info small {
    color: var(--gray-600);
}

.stat-blue .stat-icon { background: var(--blue-500); }
.stat-green .stat-icon { background: var(--green-primary); }
.stat-purple .stat-icon { background: #8b5cf6; }
.stat-orange .stat-icon { background: var(--amber-500); }
.stat-gray .stat-icon { background: var(--gray-400); }

.rbac-content-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
}

.full-span-card {
    grid-column: 1 / -1;
}

.large-card { min-height: 500px; }
.medium-card { min-height: 500px; }

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    align-items: center;
}

.filters-row .input {
    flex: 1;
    min-width: 220px;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    border-radius: 18px;
    overflow: hidden;
}

.data-table thead th {
    background: #f8fafc;
}

.data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.data-table tbody tr:hover {
    background: #f1f5f9;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.btn-sm {
    min-width: 40px;
    border-radius: 10px;
}

.btn-sm + .btn-sm {
    margin-left: 8px;
}

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 8px;
}

.timestamp {
    color: var(--gray-500);
    font-size: 12px;
}

.application-details {
    display: grid;
    gap: 12px;
}

.application-details div {
    display: flex;
    gap: 10px;
}

.application-details strong {
    min-width: 140px;
    color: var(--gray-700);
}

@media (max-width: 1080px) {
    .rbac-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .filters-row {
        gap: 12px;
    }

    .filters-row .input {
        width: 100%;
        min-width: auto;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
    }
}


/* RBAC Styles */
.permissions-grid {
    overflow-x: auto;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.permissions-table th,
.permissions-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.permissions-table th {
    background: var(--gray-100);
    font-weight: 600;
}

.permissions-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.text-success {
    color: var(--green-primary);
}

.text-muted {
    color: var(--gray-400);
}

.badge-red {
    background: var(--red-500);
    color: white;
}

.badge-blue {
    background: var(--blue-500);
    color: white;
}

.badge-green {
    background: var(--green-primary);
    color: white;
}

.badge-gray {
    background: var(--gray-500);
    color: white;
}
img {
    max-width: 50px;
    height: auto;
}
.logo{
     max-width: 100px;
    height: auto;
}

user-info{
    margin-left: 50px;
}

/* Payment Status Grid */
.payment-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.payment-status-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.payment-status-item.success {
    border-left: 4px solid var(--green-primary);
}

.payment-status-item.danger {
    border-left: 4px solid var(--red-600);
}

.payment-status-item.warning {
    border-left: 4px solid var(--amber-600);
}

.status-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.payment-status-item.success .status-icon {
    color: var(--green-primary);
}

.payment-status-item.danger .status-icon {
    color: var(--red-600);
}

.payment-status-item.warning .status-icon {
    color: var(--amber-600);
}

.status-content {
    flex: 1;
}

.status-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.status-label {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.status-percentage {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
}

.dashboard-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.status-block {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    padding: 20px;
}

.status-block .status-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-block .status-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.status-paid { border-left: 4px solid var(--green-primary); }
.status-unpaid { border-left: 4px solid var(--red-600); }
.status-overdue { border-left: 4px solid var(--red-600); }
.status-pending { border-left: 4px solid var(--amber-600); }
.status-rate { border-left: 4px solid var(--blue-500); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 40px;
    color: var(--gray-300);
}

.empty-state p {
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 600;
    margin: 0;
}

.empty-state small {
    color: var(--gray-500);
}

.notifications-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.notifications-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notification-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    align-items: start;
}

.notification-item.unread {
    border-color: var(--green-primary);
}

.notification-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 12px;
    color: var(--green-primary);
    font-size: 18px;
}

.notification-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.notification-message {
    color: var(--gray-700);
    line-height: 1.6;
}

.notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gray-600);
    font-size: 13px;
}

.notification-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notification-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-time {
    color: var(--gray-500);
    font-size: 13px;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn.btn-icon {
    padding: 8px 10px;
    min-width: auto;
}

/* Search Container */
.search-container {
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.activity-icon {
    font-size: 20px;
    color: var(--green-primary);
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-light);
    border-radius: 8px;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--gray-500);
}

/* Receipt Cards Grid */
.receipt-cards-grid {
    display: grid;
    gap: 20px;
}

.receipt-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.receipt-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.receipt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.receipt-vendor-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.receipt-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-primary);
}

.receipt-status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.receipt-status-badge.status-approved {
    background: #dcfce7;
    color: var(--green-primary);
}

.receipt-status-badge.status-overdue {
    background: #fee2e2;
    color: var(--red-600);
}

.receipt-status-badge.status-unpaid {
    background: #fee2e2;
    color: var(--red-600);
}

.receipt-status-badge.status-declined {
    background: #fee2e2;
    color: var(--red-600);
}

.receipt-details {
    margin-bottom: 16px;
}

.receipt-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.receipt-detail-row:last-child {
    border-bottom: none;
}

.receipt-detail-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

.receipt-detail-value {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 500;
}

.receipt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-link {
    background: none;
    border: none;
    color: var(--green-primary);
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-link:hover {
    color: var(--green-hover);
}

.reminder-modal {
    display: grid;
    gap: 20px;
}

.reminder-row {
    display: grid;
    gap: 16px;
}

.period-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.select-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
    color: var(--gray-900);
}

.reminder-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.reminder-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.reminder-type-card.active {
    border-color: var(--green-primary);
    background: rgba(22, 163, 74, 0.06);
}

.reminder-type-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-light);
    color: var(--green-primary);
}

.reminder-type-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.message-preview-card {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    padding: 18px;
}

.message-preview-label {
    font-size: 13px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.message-preview-text {
    color: var(--gray-800);
    line-height: 1.7;
    font-size: 14px;
}

.vendor-selection-panel {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 18px;
    background: var(--white);
    display: grid;
    gap: 16px;
}

.vendor-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.vendor-selection-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.vendor-selection-subtitle {
    color: var(--gray-600);
    font-size: 13px;
}

.vendor-selection-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.vendor-search-row {
    display: flex;
}

.vendor-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.vendor-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.vendor-row:hover {
    border-color: var(--green-primary);
}

.vendor-row-selected {
    border-color: var(--green-primary);
    background: rgba(22, 163, 74, 0.06);
}

.vendor-row input {
    width: 18px;
    height: 18px;
}

.vendor-row-info {
    display: grid;
    gap: 4px;
}

.vendor-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
}

.vendor-meta {
    font-size: 12px;
    color: var(--gray-600);
}

.vendor-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
}
