/* ========================================
   IKAYDO VISION FLASH GESTION
   STYLE PRINCIPAL
======================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #172033;
}

body {
    background: #f4f7fb;
}

a {
    color: inherit;
}


/* ========================================
   PAGE DE CONNEXION
======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background:
        radial-gradient(circle at top right, rgba(0, 145, 153, 0.12), transparent 35%),
        radial-gradient(circle at bottom left, rgba(214, 173, 0, 0.12), transparent 35%),
        #f4f7fb;
}

.login-box {
    width: 100%;
    max-width: 410px;
    padding: 45px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.login-box h1 {
    margin: 0;
    color: #008f98;
    font-size: 29px;
}

.login-box h2 {
    margin: 8px 0 35px;
    color: #d4a72c;
    font-size: 18px;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    margin-bottom: 15px;
    padding: 15px 16px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 15px;
    outline: none;
}

.login-box input:focus {
    border-color: #008f98;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 143, 152, 0.08);
}

.login-box button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #008f98;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}


/* ========================================
   STRUCTURE PRINCIPALE
======================================== */

.dashboard-page {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-height: 100vh;
    background: #f4f7fb;
}

.sidebar {
    flex: 0 0 250px;
    width: 250px;
    min-width: 250px;
    min-height: 100vh;
    padding: 32px 20px;
    background: #101827;
    color: white;
}

.sidebar h2 {
    margin: 0;
    color: #1bb7bd;
    font-size: 21px;
}

.sidebar > p {
    margin: 5px 0 38px;
    color: #d4a72c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar nav a {
    display: block;
    padding: 13px 15px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.2s ease;
}

.sidebar nav a:hover {
    background: #1d2939;
    color: white;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 40px;
}

.main-content > h1 {
    margin: 0 0 6px;
    font-size: 30px;
    color: #172033;
}

.main-content > p {
    margin-top: 0;
    color: #64748b;
}


/* ========================================
   HAUT DES PAGES
======================================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 32px;
}

.topbar h1 {
    margin: 0 0 5px;
    font-size: 30px;
}

.topbar p {
    margin: 0;
    color: #64748b;
}

.new-project-btn {
    display: inline-block;
    padding: 14px 20px;
    border: none;
    border-radius: 11px;
    background: #008f98;
    color: white;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 9px 24px rgba(0, 143, 152, 0.18);
    transition: 0.2s ease;
}

.new-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 28px rgba(0, 143, 152, 0.25);
}


/* ========================================
   TABLEAU DE BORD
======================================== */

.stats,
.project-status {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card,
.status-card {
    min-height: 125px;
    padding: 24px;
    background: white;
    border: 1px solid #e7ebf0;
    border-radius: 17px;
    box-shadow: 0 9px 30px rgba(15, 23, 42, 0.05);
}

.stat-card h3,
.status-card h3 {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
}

.stat-card strong,
.status-card strong {
    color: #172033;
    font-size: 27px;
}

.stat-card:first-child strong {
    color: #008f98;
}


/* ========================================
   FORMULAIRES
======================================== */

.project-form {
    width: 100%;
    max-width: 960px;
    margin-top: 30px;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    background: white;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
}

.project-form input,
.project-form select,
.project-form textarea {
    width: 100%;
    min-width: 0;
    padding: 15px;
    border: 1px solid #dce3eb;
    border-radius: 11px;
    background: #f8fafc;
    color: #172033;
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

.project-form input:focus,
.project-form select:focus,
.project-form textarea:focus {
    border-color: #008f98;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 143, 152, 0.07);
}

.project-form textarea {
    grid-column: 1 / -1;
    min-height: 130px;
    resize: vertical;
}

.project-form button {
    grid-column: 1 / -1;
    padding: 15px;
    border: none;
    border-radius: 11px;
    background: #008f98;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}


/* ========================================
   LISTES : PROJETS / CLIENTS / DEVIS
   / FACTURES
======================================== */

.projects-table {
    width: 100%;
    margin-top: 25px;
    overflow: hidden;
    background: white;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.project-row {
    display: grid;
    grid-template-columns: 2fr 1.4fr 1.2fr 1.3fr 1.2fr;
    gap: 18px;
    align-items: center;
    padding: 19px 22px;
    border-bottom: 1px solid #edf0f4;
}

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

.project-header {
    background: #f0f5f7;
    color: #526171;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.project-row:not(.project-header):hover {
    background: #f8fbfc;
}

.project-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.project-row span:first-child {
    color: #172033;
    font-weight: 700;
}

.project-row span:nth-child(4) {
    color: #008f98;
    font-weight: 700;
}

.project-row span:last-child {
    width: fit-content;
    max-width: 100%;
    padding: 7px 11px;
    border-radius: 20px;
    background: #eef9f9;
    color: #007a82;
    font-size: 13px;
    font-weight: 700;
}

.clickable-row {
    cursor: pointer;
}

.empty-message {
    margin: 0;
    padding: 28px 22px;
    color: #64748b;
}


/* ========================================
   DEVIS ET FACTURES
======================================== */

.quote-preview {
    width: 100%;
    max-width: 920px;
    margin: 28px auto;
    padding: 48px;
    background: white;
    color: #172033;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.09);
}

.quote-company {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 28px;
    align-items: center;
}

.quote-logo-block {
    width: 220px;
}

.quote-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.quote-company-info h2 {
    margin: 0 0 8px;
    color: #008f98;
    font-size: 23px;
}

.quote-company-info p {
    margin: 4px 0;
    color: #526171;
    font-size: 13px;
}

.quote-document-info {
    text-align: right;
}

.quote-document-info h1 {
    margin: 0 0 15px;
    color: #d4a72c;
    font-size: 37px;
    letter-spacing: 1.5px;
}

.quote-document-info p {
    margin: 6px 0;
    font-size: 13px;
}

.quote-separator {
    height: 4px;
    margin: 30px 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #008f98, #d4a72c);
}

.quote-client-box {
    margin-bottom: 30px;
    padding: 18px 22px;
    border-left: 5px solid #008f98;
    border-radius: 10px;
    background: #f5f9fa;
}

.quote-client-box h3 {
    margin: 0 0 9px;
    color: #008f98;
    font-size: 12px;
    letter-spacing: 1px;
}

.quote-client-box p {
    margin: 4px 0;
}

.quote-client-box p:first-of-type {
    font-size: 18px;
    font-weight: 700;
}

.quote-table {
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.quote-table-header,
.quote-table-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    padding: 16px 20px;
}

.quote-table-header {
    background: #172033;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.quote-table-row strong {
    text-align: right;
    color: #008f98;
}

.quote-summary {
    width: 380px;
    max-width: 100%;
    margin: 20px 0 0 auto;
}

.quote-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 5px;
    border-bottom: 1px solid #e5e9ee;
}

.quote-summary span {
    color: #64748b;
}

.quote-balance-line {
    margin-top: 6px;
    padding: 16px !important;
    border: none !important;
    border-radius: 10px;
    background: #172033;
}

.quote-balance-line span,
.quote-balance-line strong {
    color: white;
}

.quote-balance-line strong {
    color: #e2b900;
    font-size: 18px;
}

.quote-description,
.quote-conditions {
    margin-top: 35px;
}

.quote-description h3,
.quote-conditions h3 {
    margin-bottom: 10px;
    color: #008f98;
}

.quote-description p,
.quote-conditions p {
    color: #526171;
    line-height: 1.6;
}

.quote-signature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;
    margin-top: 65px;
    text-align: center;
}

.signature-line {
    height: 1px;
    margin-top: 50px;
    background: #94a3b8;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1050px) {
    .stats,
    .project-status {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quote-company {
        grid-template-columns: 180px 1fr;
    }

    .quote-document-info {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 800px) {
    .dashboard-page {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        min-height: auto;
    }

    .main-content {
        padding: 25px;
    }

    .project-form {
        grid-template-columns: 1fr;
    }

    .project-form textarea,
    .project-form button {
        grid-column: auto;
    }

    .project-row {
        grid-template-columns: 1fr;
    }

    .project-header {
        display: none;
    }

    .quote-preview {
        padding: 25px;
    }

    .quote-company {
        display: block;
    }

    .quote-logo-block {
        width: auto;
        margin-bottom: 20px;
    }

    .quote-document-info {
        margin-top: 25px;
        text-align: left;
    }

    .quote-summary {
        width: 100%;
    }
}


/* ========================================
   IMPRESSION PDF
======================================== */

@media print {
    body {
        background: white;
    }

    .sidebar,
    .topbar {
        display: none !important;
    }

    .dashboard-page {
        display: block;
    }

    .main-content {
        padding: 0;
    }

    .quote-preview {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 25px;
        border-radius: 0;
        box-shadow: none;
    }
}/* Historique des dépenses */

#expense-list .project-row,
.projects-table:last-of-type .project-header {
    grid-template-columns: 1.2fr 1.6fr 1.3fr 1.2fr 1.2fr 0.9fr;
}

.delete-expense-btn {
    border: 1px solid #ef4444;
    background: #fff5f5;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.delete-expense-btn:hover {
    background: #dc2626;
    color: white;
}/* ========================================
   NOUVEAU TABLEAU DE BORD
======================================== */

.dashboard-wrapper {
    flex: 1;
    min-width: 0;
    background: #f6f7fb;
}

/* LOGO MENU */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand h2 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.brand p {
    margin: 4px 0 0;
    color: #d4a72c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.active-menu {
    background: rgba(212, 167, 44, 0.15);
    color: #e3b63d !important;
}

.sidebar-company {
    margin-top: 50px;
    padding: 16px;
    border: 1px solid #334155;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
}

.sidebar-company strong {
    font-size: 14px;
}

.sidebar-company span {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
}


/* BARRE DU HAUT */

.dashboard-header {
    height: 76px;
    padding: 0 30px;
    background: white;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;
    gap: 22px;
}

.menu-button {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.dashboard-search {
    flex: 1;
    max-width: 620px;
}

.dashboard-search input {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid #dfe4ea;
    border-radius: 11px;
    background: #fafbfc;
    font-size: 14px;
    outline: none;
}

.dashboard-search input:focus {
    border-color: #d4a72c;
}

.dashboard-profile {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification {
    font-size: 20px;
}

.profile-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #172033;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info strong {
    font-size: 13px;
}

.profile-info span {
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
}


/* CONTENU */

.dashboard-main {
    padding: 28px;
}

.dashboard-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-title-row h1 {
    margin: 0;
    font-size: 28px;
}

.dashboard-title-row p {
    margin: 5px 0 0;
    color: #64748b;
}


/* GRILLE PRINCIPALE */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
}

.dashboard-center {
    min-width: 0;
}

.dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* CARTES FINANCIÈRES */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    background: white;
    border: 1px solid #e4e8ee;
    border-radius: 15px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.dashboard-stat-card > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-stat-card span {
    color: #64748b;
    font-size: 12px;
}

.dashboard-stat-card strong {
    margin-top: 5px;
    color: #111827;
    font-size: 21px;
}

.dashboard-stat-card small {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 10px;
}

.stat-icon,
.small-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stat-icon {
    width: 45px;
    height: 45px;
    font-size: 20px;
}

.purple {
    background: #eee8ff;
    color: #6d4aff;
}

.red {
    background: #ffe9e7;
    color: #ef4444;
}

.green {
    background: #ddf7e9;
    color: #16a663;
}

.orange {
    background: #fff0d7;
    color: #f59e0b;
}

.blue {
    background: #e3efff;
    color: #3b82f6;
}


/* PANNEAUX */

.dashboard-panel {
    background: white;
    border: 1px solid #e4e8ee;
    border-radius: 15px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-title h3 {
    margin: 0;
    font-size: 15px;
}

.panel-title p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 11px;
}

.panel-title select {
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}


/* GRAPHIQUES */

.dashboard-charts {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.chart-area {
    position: relative;
    height: 260px;
}

.donut-chart-area {
    height: 260px;
}


/* ÉTAT DES PROJETS */

.dashboard-project-status {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.small-status-card {
    padding: 15px;
    background: white;
    border: 1px solid #e4e8ee;
    border-radius: 14px;

    display: flex;
    align-items: center;
    gap: 12px;
}

.small-icon {
    width: 42px;
    height: 42px;
}

.small-status-card div:last-child {
    display: flex;
    flex-direction: column;
}

.small-status-card strong {
    font-size: 20px;
}

.small-status-card span {
    color: #64748b;
    font-size: 11px;
}


/* PROJETS RÉCENTS */

.recent-project-header,
.dashboard-project-row {
    display: grid;
    grid-template-columns: 1.5fr 1.4fr 1fr 1.1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.recent-project-header {
    padding: 10px 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-project-row {
    padding: 12px 6px;
    border-bottom: 1px solid #eef1f4;
    font-size: 12px;
}

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

.view-all-link {
    display: block;
    margin-top: 14px;
    color: #6246ea;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}


/* COLONNE DROITE */

.payment-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef1f4;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.payment-info strong {
    font-size: 12px;
}

.payment-info span {
    color: #64748b;
    font-size: 10px;
}

.payment-amount {
    text-align: right;
    font-size: 12px;
    font-weight: 700;
}


/* TÂCHES */

.task-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eef1f4;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item input {
    margin-top: 3px;
}

.task-item div {
    display: flex;
    flex-direction: column;
}

.task-item strong {
    font-size: 12px;
}

.task-item span {
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}


/* RESPONSIVE TABLEAU DE BORD */

@media (max-width: 1300px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-right {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1000px) {

    .dashboard-stats,
    .dashboard-project-status {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .dashboard-stats,
    .dashboard-project-status,
    .dashboard-right {
        grid-template-columns: 1fr;
    }

    .dashboard-profile .profile-info {
        display: none;
    }
}.dashboard-search {
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    text-decoration: none;
    border-bottom: 1px solid #eef1f4;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-type {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 20px;
    background: #eef9f9;
    color: #008f98;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.search-result-item div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-result-item strong {
    color: #172033;
    font-size: 12px;
}

.search-result-item small {
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}

.search-empty {
    padding: 18px;
    color: #64748b;
    text-align: center;
    font-size: 12px;
}