/* ================================================================
   dashboard-theme.css
   Shared "dashboard" look for the whole app — header gradient, cards,
   buttons, tables, search box, alerts. Loaded once globally from
   _Layout.cshtml, so any view can just use these classes directly
   without repeating a <style> block.
   ================================================================ */

:root {
    --clr-success: #1cc88a;
    --clr-danger: #e74a3b;
    --clr-warning: #f6c23e;
    --clr-info: #36b9cc;
    --clr-muted: #858796;
    --clr-bg: #f4f6f9;
    --clr-primary-dark: #0f5f63;
    --clr-primary: #14818a;
    --clr-primary-light: #1cc0b8;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--clr-bg);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* ===== Edge-to-edge page wrapper (pair with ViewData["FullWidth"] = true) ===== */
.full-bleed {
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

@media (min-width: 1600px) {
    .full-bleed {
        padding-left: 32px;
        padding-right: 32px;
    }
}

@media (max-width: 576px) {
    .full-bleed {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===== Page header (teal gradient) ===== */
.dashboard-header {
    background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 55%, var(--clr-primary-light) 100%);
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(20,129,138,.25);
    width: 100%;
}

    .dashboard-header h4 {
        font-weight: 800;
        letter-spacing: -0.3px;
        margin: 0;
    }

    .dashboard-header .subtitle {
        color: rgba(255,255,255,.85);
        font-size: 13px;
    }

/* ===== Toolbar card (Back / Home / Create / Logout row) ===== */
.toolbar-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 14px 18px;
    margin-bottom: 1.5rem;
}

/* ===== Shared pill buttons ===== */
.btn-dash {
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all .15s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

    .btn-dash i {
        margin-right: 8px;
    }

.btn-dash-outline {
    color: var(--clr-primary-dark);
    background: rgba(20,129,138,.08);
    border-color: rgba(20,129,138,.2);
}

    .btn-dash-outline:hover {
        background: rgba(20,129,138,.16);
        color: var(--clr-primary-dark);
    }

.btn-dash-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary));
    box-shadow: 0 4px 12px rgba(20,129,138,.25);
}

    .btn-dash-primary:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(20,129,138,.35);
    }

.btn-dash-danger {
    color: #fff;
    background: rgba(231,74,59,.9);
}

    .btn-dash-danger:hover {
        color: #fff;
        background: #e74a3b;
    }

.back-link {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    background: rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    transition: background .15s ease;
}

    .back-link:hover {
        background: rgba(255,255,255,.28);
        color: #fff;
    }

    .back-link i {
        margin-right: 6px;
    }

.logout-btn {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: rgba(231,74,59,.9);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 10px;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    transition: background .15s ease, transform .15s ease;
    white-space: nowrap;
}

    .logout-btn i {
        margin-right: 8px;
    }

    .logout-btn:hover {
        background: #e74a3b;
        color: #fff;
        transform: translateY(-1px);
    }

/* ===== Search box ===== */
.search-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 4px 16px;
    display: flex;
    align-items: center;
}

    .search-card i {
        color: var(--clr-muted);
        margin-right: 10px;
    }

    .search-card input {
        border: none;
        outline: none;
        flex: 1;
        padding: 12px 0;
        font-size: 14px;
        font-weight: 600;
        background: transparent;
    }

        .search-card input:focus {
            outline: none;
            box-shadow: none;
        }

/* ===== Card used for lists / ledgers / tables ===== */
.ledger-card {
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: none;
}

    .ledger-card .card-header {
        background: #fff;
        border-bottom: 1px solid #f0f1f5;
        border-radius: 14px 14px 0 0 !important;
        font-weight: 700;
    }

/* ===== Table styling ===== */
.dash-table {
    font-size: 14px;
    margin-bottom: 0;
}

    .dash-table thead th {
        background: var(--clr-bg);
        color: #2e3141;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: .4px;
        font-weight: 800;
        border-bottom: 2px solid #eceef3;
        padding: 14px 16px;
        white-space: nowrap;
    }

    @media (max-width: 768px) {
        .dash-table thead th {
            font-size: 13px;
            padding: 12px 10px;
        }

        .dash-table tbody td {
            padding: 10px;
            font-size: 13px;
        }
    }

    .dash-table tbody td {
        padding: 12px 16px;
        vertical-align: middle;
        border-color: #f0f1f5;
    }

    .dash-table tbody tr:hover {
        background: rgba(20,129,138,.04);
    }

/* ===== Row action pill buttons (Edit / Delete / View etc.) ===== */
.action-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    text-decoration: none;
    margin: 2px;
    transition: all .15s ease;
    border: none;
}

    .action-pill i {
        margin-right: 6px;
    }

.action-pill-edit {
    color: var(--clr-info);
    background: rgba(54,185,204,.12);
}

    .action-pill-edit:hover {
        background: rgba(54,185,204,.22);
        color: var(--clr-info);
    }

.action-pill-delete {
    color: var(--clr-danger);
    background: rgba(231,74,59,.12);
}

    .action-pill-delete:hover {
        background: rgba(231,74,59,.22);
        color: var(--clr-danger);
    }

.action-pill-view {
    color: var(--clr-success);
    background: rgba(28,200,138,.12);
}

    .action-pill-view:hover {
        background: rgba(28,200,138,.22);
        color: var(--clr-success);
    }

/* ===== Icon-only row action buttons (no text label, just the icon) ===== */
.action-icon-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    margin: 0;
    font-size: 13px;
    text-decoration: none;
    border: none;
    transition: all .15s ease;
}

    .action-icon-btn:hover {
        transform: translateY(-1px);
    }

.action-icon-btn.edit {
    color: var(--clr-info);
    background: rgba(54,185,204,.12);
}

    .action-icon-btn.edit:hover {
        background: rgba(54,185,204,.22);
        color: var(--clr-info);
    }

.action-icon-btn.delete {
    color: var(--clr-danger);
    background: rgba(231,74,59,.12);
}

    .action-icon-btn.delete:hover {
        background: rgba(231,74,59,.22);
        color: var(--clr-danger);
    }

.action-icon-btn.view {
    color: var(--clr-success);
    background: rgba(28,200,138,.12);
}

    .action-icon-btn.view:hover {
        background: rgba(28,200,138,.22);
        color: var(--clr-success);
    }

/* ===== Alerts ===== */
.alert-dash {
    border-radius: 12px;
    border: none;
    font-weight: 600;
}

/* ===== Form controls used on Create/Edit pages ===== */
.dash-form-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 24px;
}

.dash-form-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--clr-muted);
    margin-bottom: 6px;
}

.dash-form-control {
    border-radius: 10px;
    border: 1px solid #e3e6f0;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #2e3141;
}

    .dash-form-control:focus {
        border-color: var(--clr-primary);
        box-shadow: 0 0 0 .2rem rgba(20,129,138,.15);
    }

/* ===== Mobile responsiveness ===== */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 16px !important;
    }

    .toolbar-card {
        padding: 12px;
    }

    /* Compact 2-column grid for the toolbar button groups (Back/Home,
       Create/Logout) instead of 4 full-width stacked buttons — saves a lot
       of vertical space on phones. Applies to the two direct .d-flex child
       groups inside .toolbar-card. */
    .toolbar-card > .d-flex {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

        .toolbar-card > .d-flex + .d-flex {
            margin-top: 8px;
        }

    .btn-dash {
        width: 100%;
        justify-content: center;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }

    .dash-form-card {
        padding: 16px;
    }
}
