/* HostLedger - Application Stylesheet */

/* Base */
body.hostledger {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f2;
    color: #222;
}

/* App Header */
.app-header {
    background: #1a2a1a;
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header h1 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    color: white;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions a {
    color: #a8d8a8;
    text-decoration: none;
    font-size: 0.9em;
    padding: 6px 12px;
    border: 1px solid #4a7a4a;
    border-radius: 4px;
}

.header-actions a:hover {
    background: #2d4a2d;
}

.logout-link {
    color: #a8d8a8;
    font-size: 0.85em;
    text-decoration: none;
}

/* App Body Layout */
.app-body {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 55px);
}

.app-main {
    flex: 1;
    padding: 0;
    overflow-x: auto;
}

/* Dashboard */
.dashboard {
    width: 180px;
    min-width: 180px;
    background: white;
    border-left: 2px solid #ddd;
    padding: 16px;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.dashboard .label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-top: 14px;
}

.dashboard .balance {
    font-size: 1.4em;
    font-weight: bold;
    color: #1a2a1a;
}

.dashboard .revenue {
    font-size: 1.1em;
    font-weight: 600;
    color: #2d6a2d;
}

.dashboard .expense {
    font-size: 1.1em;
    font-weight: 600;
    color: #8b2222;
}

.dashboard-balance .label { margin-top: 0; }

/* Mobile dashboard */
@media (max-width: 700px) {
    .app-body {
        flex-direction: column-reverse;
    }
    .dashboard {
        width: 100%;
        min-width: 0;
        min-height: 0;
        border-left: none;
        border-bottom: 2px solid #ddd;
        display: flex;
        gap: 16px;
        padding: 10px 16px;
        position: static;
        overflow-x: auto;
    }
    .dashboard-balance,
    .dashboard-revenue,
    .dashboard-expense {
        white-space: nowrap;
    }
    .dashboard .label {
        margin-top: 0;
    }
    .dashboard .balance,
    .dashboard .revenue,
    .dashboard .expense {
        font-size: 1em;
    }
}

/* Working Zone */
.working-zone {
    display: none;
    background: #fff;
    border-bottom: 3px solid #4a7a4a;
    padding: 20px 24px;
    max-height: 55vh;
    overflow-y: auto;
}

body.working-open .working-zone {
    display: block;
}

.working-form h3 {
    margin-top: 0;
    color: #1a2a1a;
}

.working-form table {
    min-width: 400px;
}

.working-form table th {
    text-align: right;
    padding-right: 12px;
    font-weight: normal;
    color: #555;
    white-space: nowrap;
    width: 140px;
}

.working-form table td {
    padding: 4px 0;
}

.working-form table input,
.working-form table select,
.working-form table textarea {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.95em;
}

.working-form table textarea {
    height: 60px;
    resize: vertical;
}

.working-form .delete-row {
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* Ledger Zone */
.ledger-zone {
    padding: 0;
}

.ledger-empty {
    padding: 40px;
    text-align: center;
    color: #888;
}

/* Transaction Table */
table.txn {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

table.txn th {
    background: #1a2a1a;
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-weight: normal;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

table.txn td {
    padding: 7px 12px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

table.txn th.amount,
table.txn td.amount {
    text-align: right;
}

table.txn tr:hover td {
    background: #f0f7f0;
    cursor: pointer;
}

table.txn tr.revenue td.amount {
    color: #2d6a2d;
    font-weight: 600;
}

table.txn tr.expense td.amount {
    color: #8b2222;
    font-weight: 600;
}

table.txn tr.transfer td.amount {
    color: #666;
}

table.txn tr:nth-child(even) td {
    background: #fafaf8;
}

table.txn tr:nth-child(even):hover td {
    background: #f0f7f0;
}

table.txn tr.revenue td {
    border-left: 3px solid #4a9a4a;
}

table.txn tr.expense td {
    border-left: 3px solid #cc4444;
}

table.txn tr.transfer td {
    border-left: 3px solid #aaa;
}

table.txn a {
    color: #1a2a1a;
    text-decoration: none;
    font-weight: 500;
}

table.txn a:hover {
    text-decoration: underline;
    color: #2d6a2d;
}

/* Wallet list */
table.wallet-list {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table.wallet-list th {
    background: #eee;
    padding: 6px 10px;
    text-align: left;
    font-size: 0.85em;
}

table.wallet-list td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

/* Buttons */
input[type=submit],
button[type=submit] {
    background: #2d6a2d;
    color: white;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

input[type=submit]:hover,
button[type=submit]:hover {
    background: #1a4a1a;
}

.btn-delete {
    background: #8b2222;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
}

.btn-delete:hover {
    background: #6a1a1a;
}

/* Login / Claim */
.login-container,
.claim-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 30px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.login-container h2,
.claim-container h1,
.claim-container h2 {
    margin-top: 0;
    color: #1a2a1a;
}

.login-container table,
.claim-container table {
    width: 100%;
}

.login-container table th,
.claim-container table th {
    text-align: right;
    padding-right: 12px;
    font-weight: normal;
    color: #555;
    white-space: nowrap;
}

.login-container table td,
.claim-container table td {
    padding: 6px 0;
}

.login-container table input,
.claim-container table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Setup Wizard */
.setup-wizard {
    max-width: 560px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.setup-wizard h2 {
    margin-top: 0;
    color: #1a2a1a;
}

.setup-wizard h3 {
    color: #2d6a2d;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.setup-wizard table th {
    text-align: right;
    padding-right: 12px;
    font-weight: normal;
    color: #555;
    white-space: nowrap;
}

.setup-wizard table td {
    padding: 6px 0;
}

.setup-wizard table input,
.setup-wizard table select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.setup-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 12px;
}

/* ---- Homepage ---- */

.hl-page {
    min-height: 100vh;
    background: #1a2a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 80px 60px;
}

.hl-left {
    flex: 1;
    max-width: 460px;
}

.hl-brand {
    color: white;
    font-size: 3em;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1;
}

.hl-tagline {
    color: #a8d8a8;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0 0 36px;
}

.hl-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hl-point {
    color: #c8e8c8;
    font-size: 0.95em;
    padding-left: 14px;
    border-left: 2px solid #4a7a4a;
}

.hl-right {
    flex: 0 0 340px;
}

.hl-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.hl-section {
    padding: 28px 28px 24px;
}

.hl-section-title {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 16px;
}

.hl-field {
    margin-bottom: 14px;
}

.hl-label {
    font-size: 0.82em;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.hl-section input[type=text],
.hl-section input[type=email] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    color: #222;
    box-sizing: border-box;
}

.hl-section input[type=text]:focus,
.hl-section input[type=email]:focus {
    outline: none;
    border-color: #4a7a4a;
}

.hl-btn {
    width: 100%;
    display: block;
    background: #2d6a2d;
    color: white;
    border: none;
    padding: 9px;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    text-align: center;
    margin-top: 4px;
}

.hl-btn:hover { background: #1a4a1a; }

.hl-divider {
    height: 1px;
    background: #eee;
    margin: 0 28px;
}

.hl-section p {
    font-size: 0.88em;
    color: #444;
    margin: 0 0 14px;
}

.hl-value {
    font-size: 0.9em;
    color: #222;
    font-weight: 600;
    padding: 4px 0;
}

.hl-cancel {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.82em;
    color: #888;
    text-decoration: none;
}

.hl-cancel:hover { color: #444; }

.hl-footer {
    padding: 14px 60px;
    background: #0d1a0d;
    color: #666;
    font-size: 0.82em;
}

.hl-footer p { margin: 0; }
.hl-footer a { color: #a8d8a8; text-decoration: none; }

@media (max-width: 860px) {
    .hl-page { flex-direction: column; align-items: stretch; gap: 40px; padding: 48px 28px; }
    .hl-left { max-width: none; }
    .hl-right { flex: none; }
    .hl-footer { padding: 14px 28px; }
}
