@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* =========================
   BASE
========================= */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #0b1220;
    margin: 0;
}

a, .btn-link {
    color: #0071c1;
}

.content {
    padding-top: 1.1rem;
}

/* =========================
   FORMS / VALIDATION
========================= */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* =========================
   BUTTONS
========================= */

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.primary-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #2a5298;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* =========================
   LOGIN / CARD UI
========================= */

.page-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0b1220;
}

.card {
    background: #111a2e;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: white;
}

/* =========================
   LANDING PAGE
========================= */

.landing-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}

.landing-card {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* =========================
   TABLES
========================= */

.table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

    .table th, .table td {
        border-bottom: 1px solid #2a3550;
        padding: 8px;
    }

/* =========================
   LAYOUT WRAPPERS
========================= */

.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* MAIN CONTENT */
.app-content {
    flex: 1;
    overflow-y: auto;
    background: #0b1220;
    padding: 20px;
}

/* PUBLIC PAGES (Landing/Login) */
.public-shell {
    min-height: 100vh;
    background: #0b1220;
}

/* =========================
   SIDEBAR (FINTRACK)
========================= */

.sidebar-wrapper {
    height: 100vh;
    width: 260px;
    background: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1f2937;
    transition: width 0.25s ease;
    overflow: hidden;
}

    /* COLLAPSED */
    .sidebar-wrapper.collapsed {
        width: 70px;
    }

/* HEADER */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid #1f2937;
}

.brand {
    font-size: 18px;
    font-weight: 600;
}

/* TOGGLE BUTTON */
.toggle-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* NAV */
.nav-body {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 6px;
}

/* NAV ITEM */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}

    .nav-item:hover,
    .nav-item.active {
        background: #1e293b;
        color: white;
    }

/* ICON */
.icon {
    color: inherit;
    font-size: 18px;
    min-width: 22px;
    text-align: center;
}

/* DIVIDER */
.divider {
    height: 1px;
    background: #1f2937;
    margin: 10px 0;
}

/* LOGOUT */
.logout {
    color: #ef4444;
}

    .logout:hover {
        background: rgba(239, 68, 68, 0.1);
    }

/* COLLAPSED BEHAVIOUR */
.sidebar-wrapper.collapsed .nav-item span:not(.icon),
.sidebar-wrapper.collapsed .brand span {
    display: none;
}

.sidebar-wrapper.collapsed .nav-item {
    justify-content: center;
}

/* =========================
   BLZ ERROR UI
========================= */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.home-container {
    padding: 40px;
    color: white;
}

.home-hero {
    margin-bottom: 30px;
}

    .home-hero h1 {
        font-size: 34px;
        margin-bottom: 8px;
    }

    .home-hero p {
        color: #94a3b8;
    }

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.home-card {
    background: #111a2e;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s ease;
    border: 1px solid #1f2937;
}

    .home-card:hover {
        transform: translateY(-3px);
        background: #1a2540;
    }

    .home-card .icon {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .home-card h3 {
        margin: 0 0 6px 0;
    }

    .home-card p {
        color: #94a3b8;
        font-size: 13px;
    }

.ps-container {
    padding: 40px;
    color: white;
}

.ps-header h1 {
    margin: 0;
    font-size: 30px;
}

.ps-header p {
    color: #94a3b8;
    margin-top: 6px;
}

.ps-filters {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.ps-select {
    background: #111a2e;
    color: white;
    border: 1px solid #1f2937;
    padding: 10px 12px;
    border-radius: 8px;
}

/* TABLE WRAPPER */
.ps-table-wrapper {
    background: #111a2e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1f2937;
}

/* TABLE */
.ps-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

    .ps-table th {
        text-align: left;
        padding: 14px;
        background: #0f172a;
        font-size: 13px;
        color: #94a3b8;
    }

    .ps-table td {
        padding: 14px;
        border-top: 1px solid #1f2937;
    }

/* STATUS SELECT */
.ps-status {
    background: #0b1220;
    color: white;
    border: 1px solid #1f2937;
    padding: 6px 8px;
    border-radius: 6px;
}

.ps-search {
    background: #111a2e;
    color: white;
    border: 1px solid #1f2937;
    padding: 10px 12px;
    border-radius: 8px;
    width: 100%;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-block;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-closed {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* PROFIT STYLING */
.profit-positive {
    color: #22c55e;
    font-weight: 600;
}

.profit-negative {
    color: #ef4444;
    font-weight: 600;
}

.btn-edit,
.btn-save,
.btn-cancel {
    border: none;
    padding: 6px 10px;
    margin-right: 4px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-edit {
    background: #1e293b;
    color: white;
}

.btn-save {
    background: #22c55e;
    color: white;
}

.btn-cancel {
    background: #ef4444;
    color: white;
}