
/* =================================
   CLIENTFLOW LITE - DASHBOARD DESIGN
================================= */

:root {
    --navy: #172b4d;
    --navy-light: #243c61;
    --blue: #3267e9;
    --background: #f4f6fa;
    --white: #ffffff;
    --text: #263247;
    --muted: #8290a5;
    --border: #e9edf3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Main layout */

.app-layout {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */

.sidebar {
    width: 245px;
    background: var(--navy);
    color: white;
    min-height: 100vh;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 35px;
}

.brand-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: #3267e9;
    display: grid;
    place-items: center;
    font-weight: bold;
    font-size: 16px;
}

.brand h2 {
    font-size: 18px;
}

.brand span {
    color: #b4c3d8;
    font-size: 11px;
}

.nav-label {
    color: #8fa2bf;
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 0 12px;
    margin-bottom: 13px;
}

.navigation {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    margin-bottom: 7px;
    border-radius: 8px;
    color: #c6d2e3;
    font-size: 14px;
    transition: 0.2s;
}

.nav-link span {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: #29466e;
    color: white;
}

.second-label {
    margin-top: 35px;
}

.sidebar-footer {
    border-top: 1px solid #345071;
    padding: 22px 5px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar,
.header-avatar {
    width: 38px;
    height: 38px;
    background: #dce8ff;
    color: #2453b5;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: bold;
    font-size: 12px;
}

.sidebar-footer strong {
    display: block;
    font-size: 12px;
}

.sidebar-footer span {
    color: #b4c3d8;
    font-size: 11px;
}

/* Main content */

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 105px;
    background: white;
    padding: 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.topbar h1 {
    font-size: 25px;
    margin-bottom: 5px;
}

.topbar p {
    color: var(--muted);
    font-size: 13px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-right {
    gap: 22px;
}

.date-label {
    color: #718096;
    font-size: 12px;
}

.menu-button {
    display: none;
    border: none;
    background: #edf2fa;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 19px;
    cursor: pointer;
}

/* Dashboard content */

.dashboard-content {
    max-width: 1500px;
    padding: 32px 35px;
    margin: auto;
}

.welcome-banner {
    background: linear-gradient(120deg, #1c365e, #315da1);
    border-radius: 14px;
    padding: 30px 34px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    margin-bottom: 26px;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.6px;
    color: #b9d0f8;
}

.welcome-banner h2 {
    font-size: 23px;
    margin: 12px 0 7px;
}

.welcome-banner p {
    color: #d8e4f5;
    font-size: 13px;
}

.welcome-decoration {
    width: 105px;
    height: 105px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 28px;
    transform: rotate(12deg);
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: bold;
    color: #d5e4ff;
    background: rgba(255,255,255,0.08);
}

/* Summary cards */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #77859a;
    font-size: 12px;
}

.stat-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 17px;
}

.blue {
    background: #e8efff;
    color: #3267e9;
}

.purple {
    background: #f0eaff;
    color: #8253d8;
}

.green {
    background: #e4f7ec;
    color: #26985b;
}

.orange {
    background: #fff1df;
    color: #d58a26;
}

.stat-card h3 {
    font-size: 27px;
    margin: 16px 0 7px;
}

.stat-note {
    font-size: 11px;
    color: var(--muted);
}

/* Panels */

.content-grid {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 23px;
    min-width: 0;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.panel-heading h2 {
    font-size: 16px;
    margin-bottom: 5px;
}

.panel-heading p {
    color: var(--muted);
    font-size: 11px;
}

.text-link {
    color: var(--blue);
    font-size: 12px;
    font-weight: bold;
}

/* Invoice table */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    color: #8995a7;
    font-size: 10px;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px 10px;
    border-bottom: 1px solid #f0f2f6;
    font-size: 11px;
}

.status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
}

.paid {
    color: #18834d;
    background: #e4f7ec;
}

.pending {
    color: #a36a12;
    background: #fff3d9;
}

.overdue {
    color: #c43d3d;
    background: #ffebeb;
}

.demo-note {
    color: #a0a9b7;
    font-size: 10px;
    margin-top: 14px;
}

/* Activity panel */

.activity-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f2f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.green-dot {
    background: #26a269;
}

.blue-dot {
    background: #3267e9;
}

.orange-dot {
    background: #e49b36;
}

.activity-item strong {
    font-size: 12px;
}

.activity-item p {
    font-size: 11px;
    color: #77859a;
    margin: 4px 0;
}

.activity-item span {
    color: #a0a9b7;
    font-size: 10px;
}

/* Quick actions */

.quick-actions {
    margin-bottom: 25px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.action-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-card:hover {
    border-color: #9bb7f5;
    background: #f8faff;
    transform: translateY(-2px);
}

.action-icon {
    width: 35px;
    height: 35px;
    background: #eaf0ff;
    color: #3267e9;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 20px;
}

.action-card strong {
    font-size: 12px;
}

.action-card > span:last-child {
    color: var(--muted);
    font-size: 10px;
}

.footer {
    text-align: center;
    color: #9aa5b4;
    font-size: 11px;
    padding: 12px;
}

/* Responsive design */

@media (max-width: 1050px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 100;
        width: 245px;
        transition: left 0.25s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .menu-button {
        display: block;
    }

    .topbar {
        padding: 20px 16px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .topbar p {
        font-size: 11px;
    }

    .date-label {
        display: none;
    }

    .dashboard-content {
        padding: 20px 15px;
    }

    .welcome-banner {
        padding: 23px 20px;
    }

    .welcome-banner h2 {
        font-size: 19px;
    }

    .welcome-decoration {
        width: 65px;
        height: 65px;
        font-size: 20px;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card h3 {
        font-size: 22px;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 17px;
    }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================
   CLIENT MANAGEMENT
================================= */

.client-section {
    margin-bottom: 25px;
}

.client-count {
    background: #eaf0ff;
    color: #3267e9;
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.client-form {
    background: #f8faff;
    border: 1px solid #e5ebf5;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 25px;
}

.form-heading {
    margin-bottom: 20px;
}

.form-heading h3 {
    font-size: 15px;
    margin-bottom: 5px;
}

.form-heading p {
    font-size: 11px;
    color: #8290a5;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label,
.search-box label {
    font-size: 12px;
    font-weight: bold;
    color: #43516a;
}

.form-group input,
.search-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dce3ee;
    border-radius: 7px;
    background: white;
    color: #263247;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.form-group input:focus,
.search-box input:focus {
    border-color: #3267e9;
    box-shadow: 0 0 0 3px rgba(50, 103, 233, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-button,
.secondary-button,
.edit-button,
.delete-button {
    border: none;
    border-radius: 7px;
    padding: 11px 17px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.primary-button {
    background: #3267e9;
    color: white;
}

.primary-button:hover {
    background: #2454c5;
}

.secondary-button {
    background: #e8edf5;
    color: #43516a;
}

.edit-button {
    background: #eaf0ff;
    color: #2454c5;
    padding: 7px 10px;
}

.delete-button {
    background: #ffebeb;
    color: #c43d3d;
    padding: 7px 10px;
}

.form-message {
    min-height: 18px;
    margin-top: 12px;
    font-size: 12px;
    color: #18834d;
}

.client-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.search-box {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-table td {
    vertical-align: middle;
}

.client-actions {
    display: flex;
    gap: 7px;
}

.empty-clients {
    text-align: center;
    color: #8290a5;
    padding: 25px;
    font-size: 13px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .client-section {
        padding: 16px;
    }

    .client-section .panel-heading {
        align-items: flex-start;
    }
}

/* =================================
   INVOICE MANAGEMENT
================================= */

.invoice-section {
    margin-bottom: 25px;
}

.invoice-form {
    background: #f8faff;
    border: 1px solid #e5ebf5;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 25px;
}

.invoice-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.invoice-filter {
    width: 190px;
}

.invoice-filter select,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dce3ee;
    border-radius: 7px;
    background: white;
    color: #263247;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.invoice-filter select:focus,
.form-group select:focus {
    border-color: #3267e9;
    box-shadow: 0 0 0 3px rgba(50, 103, 233, 0.1);
}

.invoice-table {
    min-width: 900px;
}

.invoice-table th,
.invoice-table td {
    padding: 13px 12px;
    vertical-align: middle;
}

.invoice-number {
    font-weight: bold;
    color: #3267e9;
}

.invoice-status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    text-transform: capitalize;
    white-space: nowrap;
}

.invoice-status.paid {
    color: #16834e;
    background: #e5f7ed;
}

.invoice-status.pending {
    color: #a66b12;
    background: #fff3d9;
}

.invoice-status.overdue {
    color: #c43d3d;
    background: #ffebeb;
}

.invoice-actions {
    display: flex;
    gap: 7px;
    align-items: center;
}

.invoice-actions .edit-button,
.invoice-actions .delete-button {
    white-space: nowrap;
}

@media (max-width: 700px) {
    .invoice-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .invoice-filter {
        width: 100%;
    }

    .invoice-section {
        padding: 16px;
    }
}
