* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f3;
    display: flex;
    min-height: 100vh;
    color: #111;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background: #ffffff;
    border-right: 0.5px solid #e8e8e5;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    padding: 16px;
    border-bottom: 0.5px solid #e8e8e5;
    margin-bottom: 6px;
}

.sidebar-logo .name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.sidebar-logo .business {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    font-weight: 400;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.1s;
}

.nav-item:hover {
    background: #f5f5f3;
    color: #111;
}

.nav-item.active {
    background: #f5f5f3;
    color: #111;
    font-weight: 500;
}

.nav-item i {
    font-size: 16px;
    width: 18px;
}

.nav-footer {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 0.5px solid #e8e8e5;
}

.nav-footer a {
    font-size: 12px;
    color: #999;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-footer a:hover { color: #111; }

/* Main area */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

/* Topbar */
.topbar {
    background: #ffffff;
    border-bottom: 0.5px solid #e8e8e5;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title { font-size: 15px; font-weight: 500; color: #111; }
.topbar-sub { font-size: 11px; color: #999; margin-top: 2px; }

/* Content */
.content { padding: 20px; }

/* Metric cards */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric {
    background: #ffffff;
    border: 0.5px solid #e8e8e5;
    border-radius: 10px;
    padding: 14px 16px;
}

.metric-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
}

.metric-value {
    font-size: 24px;
    font-weight: 500;
    color: #111;
    margin-top: 6px;
    line-height: 1;
}

.metric-sub {
    font-size: 11px;
    color: #bbb;
    margin-top: 5px;
}

/* Cards */
.card {
    background: #ffffff;
    border: 0.5px solid #e8e8e5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-header {
    padding: 11px 16px;
    border-bottom: 0.5px solid #e8e8e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title { font-size: 13px; font-weight: 500; color: #111; }
.card-sub { font-size: 11px; color: #999; margin-top: 2px; }
.card-body { padding: 12px 16px; }

/* Property rows */
.property-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 0.5px solid #f0f0ee;
    cursor: pointer;
}

.property-row:last-child { border-bottom: none; }
.property-row:hover { background: #fafaf8; }

.prop-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    background: #e6f1fb;
    color: #185fa5;
}

.prop-name { font-size: 13px; font-weight: 500; color: #111; }
.prop-owner { font-size: 11px; color: #999; margin-top: 1px; }
.prop-amount { font-size: 13px; font-weight: 500; color: #111; text-align: right; }

/* Badges */
.badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    white-space: nowrap;
}

.badge-green { background: #eaf3de; color: #3b6d11; }
.badge-blue { background: #e6f1fb; color: #185fa5; }
.badge-orange { background: #faeeda; color: #854f0b; }
.badge-red { background: #fce8e8; color: #a32d2d; }
.badge-gray { background: #f0f0ee; color: #888; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: opacity 0.1s;
}

.btn:hover { opacity: 0.85; }
.btn-dark { background: #111; color: white; }
.btn-outline { background: white; color: #555; border: 0.5px solid #ddd; }
.btn-outline:hover { background: #f5f5f3; }

/* Form elements */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; color: #555; display: block; margin-bottom: 5px; font-weight: 500; }
.form-hint { font-size: 11px; color: #bbb; margin-top: 3px; }

.form-input, .form-select {
    width: 100%;
    padding: 8px 11px;
    border: 0.5px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    color: #111;
    background: white;
    appearance: none;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #111;
}

/* Summary rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 0.5px solid #f0f0ee;
    font-size: 13px;
}

.summary-row:last-child { border-bottom: none; }
.summary-label { color: #666; }
.summary-value { font-weight: 500; }
.text-red { color: #e24b4a; }
.text-green { color: #1d9e75; }
.text-orange { color: #854f0b; }

/* Payout total */
.payout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f5f5f3;
    border-top: 0.5px solid #e8e8e5;
}

.payout-label { font-size: 15px; font-weight: 500; }
.payout-value { font-size: 18px; font-weight: 600; color: #1d9e75; }

/* Flash messages */
.flash-success {
    background: #eaf3de;
    color: #3b6d11;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

.flash-error {
    background: #fce8e8;
    color: #a32d2d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* BAS specific */
.bas-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 0.5px solid #f0f0ee;
}

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

.bas-code {
    width: 36px;
    height: 28px;
    border-radius: 6px;
    background: #f5f5f3;
    border: 0.5px solid #e8e8e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #111;
    flex-shrink: 0;
    font-family: monospace;
}

.bas-label { flex: 1; font-size: 12px; color: #666; line-height: 1.4; }
.bas-label strong { color: #111; font-weight: 500; display: block; font-size: 13px; }
.bas-value { font-size: 13px; font-weight: 500; color: #111; min-width: 90px; text-align: right; }
.section-header {
    padding: 7px 16px;
    background: #f5f5f3;
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 0.5px solid #e8e8e5;
}

/* Expense rows */
.expense-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 0.5px solid #f0f0ee;
}

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

.exp-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Info banner */
.info-banner {
    background: #e6f1fb;
    border: 0.5px solid #b5d4f4;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #185fa5;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Divider */
.divider { height: 0.5px; background: #e8e8e5; margin: 12px 0; }

/* Empty state */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
    font-size: 13px;
}

/* Booking row */
.booking-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 0.5px solid #f0f0ee;
    font-size: 12px;
}

.booking-row:last-child { border-bottom: none; }
.platform-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }