* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    background: #f8fafc;
    color: #0f172a;
}

/* AUTH */
.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8fafc;
}

.auth-left {
    background: linear-gradient(135deg, #0f172a, #0f766e);
    color: white;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-left h1 {
    font-size: 42px;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-left p {
    font-size: 17px;
    opacity: 0.9;
    line-height: 1.7;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-box {
    width: 430px;
    background: white;
    padding: 42px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15,23,42,0.08);
}

.auth-box h2 {
    margin-bottom: 26px;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.auth-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: #0f766e;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
    margin-top: 10px;
}

.auth-btn:hover {
    background: #115e59;
    transform: translateY(-1px);
}

/* APP LAYOUT */
.app-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: #f8fafc;
    overflow-x: hidden;
}

/* PROFESSIONAL HEADER */
.topbar-pro {
    position: fixed;
    top: 0;
    left: 270px;
    right: 0;
    height: 82px;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 8px 28px rgba(15,23,42,0.04);
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.topbar-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 3px;
    background: transparent;
}

.topbar-company {
    min-width: 0;
}

.topbar-company h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

.topbar-company span {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.business-dropdown-form {
    height: 46px;
    min-width: 280px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.business-dropdown-form span {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.business-dropdown-form select {
    width: 100%;
    height: 42px;
    border: none;
    outline: none;
    background: transparent;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.logout-btn-pro {
    height: 46px;
    min-width: 110px;
    padding: 0 20px;
    border-radius: 14px;
    background: #fef2f2;
    color: #dc2626 !important;
    border: 1px solid #fecaca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
    transition: 0.25s ease;
}

.logout-btn-pro:hover {
    background: #fee2e2;
    color: #b91c1c !important;
}
.topbar-pro .topbar-right a.logout-btn-pro,
.topbar-pro .topbar-right a.logout-btn-pro:link,
.topbar-pro .topbar-right a.logout-btn-pro:visited {
    height: 46px !important;
    min-width: 110px !important;
    padding: 0 20px !important;
    border-radius: 14px !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.topbar-pro .topbar-right a.logout-btn-pro:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    text-decoration: none !important;
}

/* SIDEBAR */
.sidebar {
    width: 270px;
    min-width: 270px;
    flex-shrink: 0;
    background: #0f172a;
    color: white;
    padding: 82px 18px 25px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    scrollbar-width: none;
    z-index: 950;
}

.sidebar::-webkit-scrollbar {
    width: 0;
}

.sidebar:hover {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.22) transparent;
}

.sidebar:hover::-webkit-scrollbar {
    width: 6px;
}

.sidebar:hover::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

.sidebar-logo {
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo h2 {
    font-size: 23px;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.sidebar-logo p {
    font-size: 13px;
    opacity: 0.7;
    white-space: nowrap;
    margin-top: 4px;
}

.sidebar a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 12px;
    width: 100%;
    padding: 13px 17px;
    margin-bottom: 7px;
    border-radius: 14px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.22s ease;
    position: relative;
}

.sidebar a.active,
.sidebar a:hover {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15,118,110,0.18);
}

.sidebar a.active {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15,118,110,0.18);
}

.sidebar a.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: #14b8a6;
    border-radius: 10px;
}

.desktop-sidebar-toggle {
    position: fixed;
    top: 22px;
    left: 247px;
    z-index: 9999;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #0f766e;
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15,118,110,0.25);
    transition: all 0.3s ease;
}

.desktop-sidebar-toggle:hover {
    background: #0d645d;
}

.sidebar-collapsed {
    width: 88px !important;
    min-width: 88px !important;
    padding-left: 14px;
    padding-right: 14px;
    overflow: hidden;
}

.sidebar-collapsed .sidebar-logo h2,
.sidebar-collapsed .sidebar-logo p {
    opacity: 0;
    visibility: hidden;
}

.sidebar-collapsed a {
    justify-content: center;
    font-size: 0;
    padding: 14px;
}

.sidebar-collapsed a::first-letter {
    font-size: 18px;
}

.app-wrapper.sidebar-mini .desktop-sidebar-toggle {
    left: 66px !important;
}

.app-wrapper.sidebar-mini .main-content {
    margin-left: 88px !important;
}

.app-wrapper.sidebar-mini .topbar-pro {
    left: 88px !important;
}

body.sidebar-mini-active .topbar-pro {
    left: 88px !important;
}

body.sidebar-mini-active .main-content {
    margin-left: 88px !important;
}

body.sidebar-mini-active .desktop-sidebar-toggle {
    left: 66px !important;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: 270px;
    padding: 106px 28px 28px !important;
    overflow-x: auto;
    transition: all 0.3s ease;
}

/* PAGE HEADER */
.page-header,
.topbar {
    background: white;
    padding: 20px 24px;
    border-radius: 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.page-header h2,
.topbar h3 {
    font-size: 22px;
    color: #0f172a;
    margin-bottom: 3px;
    letter-spacing: -0.02em;
}

.page-header p {
    color: #64748b;
    font-size: 13px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BUTTONS */
button,
.btn-primary,
.btn-secondary,
.add-btn,
.action-btn {
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.22s ease;
}

.btn-primary,
.add-btn,
.green-btn {
    background: #0f766e;
    color: white;
}

.btn-primary:hover,
.add-btn:hover,
.green-btn:hover {
    background: #0d645d;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.dark-btn {
    background: #334155;
    color: white;
}

.dark-btn:hover {
    background: #1e293b;
}

.btn-primary,
.btn-secondary,
.add-btn,
.action-btn {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 13px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 46px;
    padding: 0 22px;
    background: #dc2626;
    color: #fff !important;
    border-radius: 14px;
    text-decoration: none !important;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* FORMS */
.form-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7;
    max-width: 760px;
}

.form-card h3 {
    margin-bottom: 22px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label,
.filter-item label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #334155;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea,
.filter-item input,
.filter-item select {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #dbe2ea;
    border-radius: 13px;
    font-size: 14px;
    transition: all 0.22s ease;
    outline: none;
    background: #f8fafc;
    color: #334155;
}

.form-group textarea {
    height: auto;
    padding: 13px 15px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.filter-item input:focus,
.filter-item select:focus {
    border-color: #0f766e;
    background: white;
    box-shadow: 0 0 0 4px rgba(15,118,110,0.08);
}

input[type="file"] {
    width: 100%;
    height: 52px;
    padding: 10px 14px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    height: 34px;
    margin-right: 14px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: #0f766e;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

/* FILTERS */
.filter-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.transaction-filter {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1.4fr auto;
    gap: 12px;
    align-items: end;
}

.report-filter {
    display: grid;
    grid-template-columns: 1.5fr auto;
    gap: 12px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions .btn-primary,
.filter-actions .btn-secondary {
    height: 44px;
}

/* CARDS */
.dashboard-summary-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dashboard-card,
.card {
    background: white;
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7;
    transition: all 0.22s ease;
}

.dashboard-card:hover,
.card:hover {
    transform: translateY(-2px);
}

.dashboard-card span,
.card h4 {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-card strong,
.card h2 {
    display: block;
    font-size: 20px;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* PANELS AND TABLES */
.dashboard-section {
    margin-top: 18px;
}

.dashboard-two-col {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.dashboard-panel {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7;
    overflow: hidden;
}

.dashboard-panel.full {
    width: 100%;
}

.dashboard-panel-header {
    margin-bottom: 14px;
}

.dashboard-panel-header h3 {
    font-size: 17px;
    color: #0f172a;
    margin-bottom: 4px;
}

.dashboard-panel-header p {
    font-size: 13px;
    color: #64748b;
}

.dashboard-table-wrap,
.table-card {
    overflow-x: auto;
}

.dashboard-table,
.journal-table {
    width: 100%;
    min-width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

.dashboard-table th,
.journal-table th {
    background: #f8fafc;
    color: #334155;
    padding: 13px 14px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    text-align: left;
}

.dashboard-table td,
.journal-table td {
    padding: 13px 14px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

.dashboard-table tr:hover,
.journal-table tr:hover {
    background: #f8fafc;
}

.report-summary-grid {
    grid-template-columns: repeat(5, 1fr);
    margin-bottom: 18px;
}

.report-table {
    min-width: 1200px !important;
}

.report-period {
    margin-top: 10px;
    font-size: 13px;
}

.table-card {
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7;
    margin-top: 18px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.table-header h3 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.table-header p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.table-card > table {
    width: 100%;
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
}

.table-card > table th {
    background: #f8fafc;
    color: #334155;
    text-align: left;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.table-card > table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    white-space: nowrap;
    color: #334155;
    font-size: 13px;
}

.table-card > table tr:hover {
    background: #f8fafc;
}

.table-card > table tr:last-child td {
    border-bottom: none;
}

.table-card > table a {
    color: #0f766e;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
}

.table-card > table a:hover {
    color: #115e59;
}

.table-card::-webkit-scrollbar,
.dashboard-table-wrap::-webkit-scrollbar {
    height: 9px;
}

.table-card::-webkit-scrollbar-track,
.dashboard-table-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 12px;
}

.table-card::-webkit-scrollbar-thumb,
.dashboard-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 12px;
}

.journal-table input,
.journal-table select,
.journal-table textarea {
    width: 100%;
    min-width: 160px;
    height: 42px;
    padding: 0 13px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #ffffff;
    font-size: 13px;
    color: #334155;
    transition: all 0.2s ease;
}

.journal-table input:focus,
.journal-table select:focus,
.journal-table textarea:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(15,118,110,0.08);
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.badge-credit,
.badge-active,
.badge-reconciled {
    background: #dcfce7;
    color: #166534;
}

.badge-debit,
.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.badge-paid,
.badge-matched {
    background: #dbeafe;
    color: #1e40af;
}

.badge-advance,
.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-future {
    background: #ede9fe;
    color: #5b21b6;
}

/* SELECT BUSINESS */
.business-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #0f766e);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.business-panel {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 26px;
    padding: 36px;
    box-shadow: 0 30px 80px rgba(15,23,42,0.25);
}

.business-header {
    text-align: center;
    margin-bottom: 26px;
}

.business-header h1 {
    font-size: 30px;
    color: #0f172a;
    margin-bottom: 8px;
}

.business-header p {
    color: #64748b;
    font-size: 14px;
}

.business-list {
    display: grid;
    gap: 13px;
}

.business-card-pro {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    text-decoration: none;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.22s ease;
}

.business-card-pro:hover {
    background: #0f766e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15,118,110,0.22);
}

.business-icon {
    width: 48px;
    height: 48px;
    background: #0f766e;
    color: white;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.business-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.business-card-pro:hover .business-icon {
    background: white;
    color: #0f766e;
}

.business-info {
    flex: 1;
    min-width: 0;
}

.business-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.business-info p {
    font-size: 13px;
    color: #64748b;
}

.business-card-pro:hover .business-info p {
    color: rgba(255,255,255,0.85);
}

.business-arrow {
    font-size: 26px;
    line-height: 1;
    opacity: 0.7;
}

.business-bottom {
    display: grid;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.business-add-btn,
.business-logout-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 14px;
    border-radius: 15px;
    font-weight: 700;
}

.business-add-btn {
    background: #0f766e;
    color: white;
}

.business-logout-btn {
    background: #f1f5f9;
    color: #334155;
}

/* PAGINATION */
.pagination,
.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span,
.audit-pagination a,
.audit-pagination span {
    min-width: 46px;
    height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pagination a:hover,
.audit-pagination a:hover {
    background: #e2e8f0;
}

.pagination .active-page,
.audit-pagination .active-page {
    background: #0f766e !important;
    color: white !important;
    border-color: #0f766e !important;
}

.pagination span,
.audit-pagination span {
    background: transparent;
    border: none;
    min-width: auto;
    padding: 0 6px;
    color: #94a3b8;
}

.audit-pagination .nav-btn {
    width: 76px;
}

/* TABLE ACTIONS */
.table-actions {
    white-space: nowrap;
}

.edit-link,
.table-actions a:first-child {
    color: #0f766e !important;
    font-weight: 700;
    text-decoration: none !important;
}

.delete-link,
.table-actions a:last-child {
    color: #dc2626 !important;
    font-weight: 700;
    text-decoration: none !important;
}

.edit-link:hover,
.table-actions a:first-child:hover {
    color: #115e59 !important;
}

.delete-link:hover,
.table-actions a:last-child:hover {
    color: #b91c1c !important;
}

.action-divider {
    margin: 0 8px;
    color: #cbd5e1;
}

/* MODALS */
.confirm-modal,
.system-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: rgba(15,23,42,0.72) !important;
    backdrop-filter: blur(6px);
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px !important;
}

.confirm-modal.show,
.system-modal.show {
    display: flex !important;
}

.confirm-box,
.system-modal-box {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 24px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0,0,0,0.28);
}

.confirm-icon,
.system-modal-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 32px;
    font-weight: 800;
}

.confirm-box h3,
.system-modal-box h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #0f172a;
}

.confirm-box p,
.system-modal-box p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-actions,
.system-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.system-modal-actions .btn-primary,
.system-modal-actions .btn-secondary {
    min-width: 120px;
}

/* ALERTS */
.alert-warning,
.alert-error,
.alert-success {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.show-alert {
    display: block !important;
}

/* INVOICE */
.view-invoice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f766e;
    color: white !important;
    padding: 8px 13px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: 0.22s ease;
}

.view-invoice-btn:hover {
    background: #0d645d;
    transform: translateY(-1px);
}

.current-invoice-box {
    margin: 10px 0 20px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.current-invoice-box strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 4px;
}

.current-invoice-box span {
    display: block;
    color: #64748b;
    font-size: 13px;
    word-break: break-all;
}

.invoice-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15,23,42,0.75);
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.invoice-modal-content {
    width: 90vw;
    height: 90vh;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.invoice-modal-header {
    height: 60px;
    padding: 0 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.invoice-modal-header h3 {
    font-size: 18px;
    color: #0f172a;
}

.invoice-modal-header button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    font-size: 26px;
    background: #ef4444;
    color: white;
}

.invoice-box {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

/* COPY TOAST */
.copy-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.copy-btn {
    height: 34px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid #ccfbf1;
    background: #ecfeff;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.copy-btn:hover {
    background: #ccfbf1;
    transform: translateY(-1px);
}

.password-copy {
    background: #f8fafc;
    color: #334155;
    border-color: #e2e8f0;
}

.password-copy:hover {
    background: #e2e8f0;
}

.copy-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 999999;
    background: #0f766e;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 18px 40px rgba(15,118,110,0.28);
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
    pointer-events: none;
    transition: all 0.25s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* AUDIT REPORT */
.audit-page {
    padding: 30px;
    background: #f8fafc;
    min-height: 100vh;
}

.audit-tabs {
    display: flex;
    gap: 12px;
    margin: 0 0 22px;
    flex-wrap: wrap;
}

.audit-tab {
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: #475569;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.audit-tab:hover {
    background: #ecfeff;
    color: #0f766e;
    border-color: #99f6e4;
}

.audit-tab.active {
    background: #0f766e;
    color: white;
    border-color: #0f766e;
    box-shadow: 0 12px 24px rgba(15,118,110,0.18);
}

.audit-report-tab {
    animation: fadeAudit 0.25s ease;
}

@keyframes fadeAudit {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.audit-log-table {
    width: 100%;
    min-width: 1200px;
    table-layout: fixed;
}

.audit-log-table th,
.audit-log-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-log-table th:nth-child(1),
.audit-log-table td:nth-child(1) { width: 170px; }
.audit-log-table th:nth-child(2),
.audit-log-table td:nth-child(2) { width: 170px; }
.audit-log-table th:nth-child(3),
.audit-log-table td:nth-child(3) { width: 110px; }
.audit-log-table th:nth-child(4),
.audit-log-table td:nth-child(4) { width: 160px; }
.audit-log-table th:nth-child(5),
.audit-log-table td:nth-child(5) { width: 100px; }
.audit-log-table th:nth-child(6),
.audit-log-table td:nth-child(6) { width: 490px; }

/* BANK RECONCILIATION */
.reconcile-input {
    width: 100%;
    min-width: 150px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: 0.25s ease;
}

.reconcile-input:focus {
    border-color: #0f766e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15,118,110,0.08);
}

.business-filter-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.04);
    width: fit-content;
    flex-wrap: wrap;
}

.business-filter-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    height: 42px;
    padding: 0 18px;
    border-radius: 13px;
    color: #475569;
    background: #f8fafc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.business-filter-tabs a:not(.active-filter):hover {
    background: #ecfeff;
    color: #0f766e;
}

.business-filter-tabs .active-filter {
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15,118,110,0.18);
}

.reconciliation-table table {
    width: 100%;
    table-layout: fixed;
}

.reconciliation-table th:nth-child(1),
.reconciliation-table td:nth-child(1) { width: 110px; }
.reconciliation-table th:nth-child(2),
.reconciliation-table td:nth-child(2) { width: 240px; }
.reconciliation-table th:nth-child(3),
.reconciliation-table td:nth-child(3) { width: 200px; }
.reconciliation-table th:nth-child(4),
.reconciliation-table td:nth-child(4) { width: 130px; }
.reconciliation-table th:nth-child(5),
.reconciliation-table td:nth-child(5) { width: 140px; }
.reconciliation-table th:nth-child(6),
.reconciliation-table td:nth-child(6) { width: 160px; }
.reconciliation-table th:nth-child(7),
.reconciliation-table td:nth-child(7) { width: 150px; }

/* ADVANCE RECOGNITION */
.advance-recognition-table {
    margin-top: 24px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15,23,42,0.05);
    overflow: hidden;
    border: 1px solid #eef2f7;
}

.advance-recognition-table .table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f7;
    background: #fafcff;
}

.advance-recognition-table table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    table-layout: fixed;
}

.advance-recognition-table th,
.advance-recognition-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}

.advance-recognition-table th {
    background: #f8fafc;
    text-align: left;
    font-weight: 800;
    border-bottom: 1px solid #e2e8f0;
}

.advance-recognition-table tr:hover {
    background: #fafafa;
}

.advance-recognition-table th:nth-child(1),
.advance-recognition-table td:nth-child(1) { width: 80px; text-align: center; }
.advance-recognition-table th:nth-child(2),
.advance-recognition-table td:nth-child(2) { width: 130px; }
.advance-recognition-table th:nth-child(3),
.advance-recognition-table td:nth-child(3) { width: 300px; }
.advance-recognition-table th:nth-child(4),
.advance-recognition-table td:nth-child(4) { width: 100px; }
.advance-recognition-table th:nth-child(5),
.advance-recognition-table td:nth-child(5) { width: 160px; }
.advance-recognition-table th:nth-child(6),
.advance-recognition-table td:nth-child(6) { width: 160px; }
.advance-recognition-table th:nth-child(7),
.advance-recognition-table td:nth-child(7) { width: 150px; }

.advance-recognition-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0f766e;
    cursor: pointer;
}

.advance-recognition-table .badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.advance-recognition-table .btn-primary {
    min-width: 220px;
}

/* FLATPICKR */
.date-range-input,
.flatpickr-input {
    cursor: pointer;
    background: #f8fafc !important;
}

.flatpickr-calendar {
    border-radius: 18px !important;
    box-shadow: 0 20px 60px rgba(15,23,42,0.18) !important;
    border: none !important;
    overflow: hidden;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #0f766e !important;
    border-color: #0f766e !important;
}

.flatpickr-day.inRange {
    background: rgba(15,118,110,0.12) !important;
    border-color: rgba(15,118,110,0.12) !important;
}

/* FOOTER */
.app-footer {
    margin-top: 20px;
    padding: 18px 28px;
    background: #ffffff;
    border-top: 1px solid #eef2f7;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.app-footer strong {
    color: #0f172a;
}

/* PRINT */
@media print {
    .sidebar,
    .topbar,
    .topbar-pro,
    .desktop-sidebar-toggle,
    .no-print,
    .app-footer {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* RESPONSIVE */
@media(max-width: 1400px) {
    .report-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 1200px) {
    .dashboard-summary-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-two-col {
        grid-template-columns: 1fr;
    }

    .transaction-filter {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media(max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .app-wrapper {
        flex-direction: column;
    }

    .topbar-pro {
        position: relative;
        left: 0;
        right: auto;
        height: auto;
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        padding: 25px 18px;
    }

    .desktop-sidebar-toggle {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 18px !important;
    }

    .dashboard-summary-grid,
    .dashboard-grid,
    .filter-grid,
    .transaction-filter,
    .report-filter,
    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-right,
    .page-actions,
    .business-dropdown-form,
    .add-btn,
    .action-btn {
        width: 100%;
    }
}

.form-actions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:20px;
}

.btn-back-inline{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 20px;
    background:#ffffff;
    color:#0f172a;
    border:1px solid #dbe3ee;
    border-radius:12px;
    text-decoration:none;
    font-weight:600;
    transition:all 0.25s ease;
}

.btn-back-inline:hover{
    background:#f8fafc;
    border-color:#0f766e;
    color:#0f766e;
}

.permission-box {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.permission-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    font-weight: 700;
    color: #334155;
}

.permission-item input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #0f766e;
}