﻿:root {
    --clr-primary-start: rgba(37,99,235,0.9);
    --clr-primary-end: rgba(30,64,175,0.7);
    --clr-accent: #3b82f6;
    --clr-text: #374151;
    --bg-hover: #f9fafb;
    --dur: 0.2s;
}

/* Base */
body {
    font-family: "Segoe UI", sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 0;
}

/* Navbar */
.navbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-brand {
    color: var(--clr-text);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Sidebar */
#sidebar {
    display: block;
    width: 200px;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    background: var(--clr-primary-start);
    padding-top: 1rem;
    overflow: auto;
    z-index: 100;
}

    #sidebar .nav-link {
        display: block;
        color: #eef2f7;
        padding: .75rem 1rem;
        font-size: .95rem;
        text-decoration: none;
        transition: background var(--dur);
    }

        #sidebar .nav-link:hover,
        #sidebar .nav-link.active {
            background: rgba(255,255,255,0.15);
            font-weight: 500;
        }

/* Main content */
#main-content {
    margin-top: 56px;
    margin-left: 200px;
    padding: 1.5rem;
    min-height: calc(100vh - 56px);
}

h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--clr-text);
}

/* Inputs */
.input-default {
    width: 100%;
    padding: .5rem;
    margin: 4px 0 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .95rem;
    box-sizing: border-box;
}

.search-input {
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.8);
    background: transparent;
    padding: .25rem .5rem;
    font-size: .875rem;
    color: #fff;
    outline: none;
}

    .search-input::placeholder {
        color: #fff;
        opacity: 0.8;
    }

/* Buttons */
.btn {
    padding: .5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: .875rem;
    transition: opacity var(--dur);
}

    .btn:hover {
        opacity: .85;
    }

.btn-primary {
    background: var(--clr-primary-start);
    color: #fff;
}

.btn-secondary {
    background: var(--clr-accent);
    color: #fff;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-link {
    background: transparent;
    text-decoration: underline;
    color: var(--clr-text);
    padding: 0;
}

.btn-sm {
    padding: .25rem .5rem;
    font-size: .75rem;
}

.btn-little {
    padding: .25rem .5rem;
    font-size: .50rem;
}

.btn-med {
    padding: .25rem .5rem;
    font-size: .90rem;
}

/* Cards */
.card {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .card + .card {
        margin-top: 20px;
    }

.card-header {
    display: flex;
    align-items: center;
    background: linear-gradient(50deg, var(--clr-primary-start), var(--clr-primary-end));
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 8px 8px 0 0;
}

    .card-header .hdr-title {
        font-size: 1rem;
    }

.card-body {
    padding: 1rem;
}

/* Tables (.table-fixed) */
.table-fixed {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

    .table-fixed th,
    .table-fixed td {
        padding: .5rem .75rem;
        font-size: .875rem;
        color: #111827;
        text-align: left;
    }

    .table-fixed thead th {
        background: #f3f4f6;
        color: var(--clr-text);
        font-size: .8rem;
    }

    .table-fixed tbody tr:hover {
        background: var(--bg-hover);
    }

/* Summary cards */
.summary-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 20px;
    align-items: center;
}

.summary-card {
    flex: 1 1 200px;
    background: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .summary-card h3 {
        margin: 0;
        font-size: 1.1rem;
        color: var(--clr-text);
    }

    .summary-card p {
        margin: .5rem 0 0;
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--clr-primary-start);
    }

/* Pagination */
.pagination {
    padding: .5rem 0;
    text-align: right;
}

    .pagination button {
        margin: 0 .25rem;
    }

/* Modal (merged & centered) */
/* Unified block: always 95% width, capped at 900px, and never shorter than 60vh */
.modal.show.d-block .modal-dialog .modal-content {
    background: #fff;
    border-radius: 8px;
    width: 95%;
    max-width: 1400px;
    min-height: 60vh; /* new: force same height */
    max-height: calc(100vh - 60px);
    overflow: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: auto;
}

.modal-backdrop.show {
    background: rgba(0,0,0,0.5);
}

/* Modal header/body/footer */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    background: linear-gradient(135deg, var(--clr-primary-start), var(--clr-primary-end));
    color: #fff;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Ensure task grid inside step 2 has its scrolling area */
.task-grid-container {
    max-height: calc(60vh - 200px);
    overflow-y: auto;
}

/* Override Bootstrap .table-sm in modals to match .table-fixed */
.modal-body #task-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

    .modal-body #task-table th,
    .modal-body #task-table td {
        padding: .5rem .75rem;
        font-size: .875rem;
        color: #111827;
        text-align: left;
        border-bottom: 1px solid #dee2e6;
    }

    .modal-body #task-table thead th {
        background: #f3f4f6;
        color: var(--clr-text);
        font-size: .8rem;
        border-bottom: 2px solid #dee2e6;
    }

    .modal-body #task-table tbody tr:hover {
        background: var(--bg-hover);
    }

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

    .tabs button {
        background: transparent;
        border: none;
        padding: .5rem 1rem;
        cursor: pointer;
        font-size: .9rem;
        color: var(--clr-text);
    }

        .tabs button.active {
            border-bottom: 2px solid var(--clr-primary-start);
            font-weight: 500;
        }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* make the handle show a hand */
.draggable-row .drag-handle {
    cursor: grab;
    user-select: none;
}

/* when you start dragging, flip it to the closed hand */
.draggable-row.dragging .drag-handle {
    cursor: grabbing;
}

/* highlight a valid drop target (optional) */
.draggable-row.drop-target {
    background-color: rgba(37, 99, 235, 0.1) !important;
}

/* smooth background transitions */
.draggable-row {
    transition: background 0.2s;
}
/* ———————————————— */
/* User avatars & initials */
/* — Header avatar (in the top nav) and table avatar (in Users & Teams) */
.header-avatar,
.table-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

/* Fallback when no image—just show initials */
.avatar-fallback,
.avatar-initial {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: var(--clr-accent);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    vertical-align: middle;
}

/* limit height of the “Submitting…” popup */
.processing-modal .modal-content {
    min-height: auto !important;
    max-height: 50vh !important; /* half the viewport height */
    overflow-y: auto !important; /* scroll inside if needed */
}

/* .modal-content rule */
.modal.show.d-block .modal-dialog .modal-content {
    overflow: visible !important;
}

.smart-toggle-col button i {
    font-weight: bold;
}

/*Form Editer note button color change empty/filled*/
.note-empty {
    color: black;
}

.note-filled {
    color: blue;
}

.note-truncate {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* pale blue for team‐type rows in the Dashboard */
.team-row {
    background-color: #d0ebff; /* very light blue */
}

.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height .35s ease;
}
