/* =========================================================
   AI Constructions – Finance Ledger
   Custom UI styles (FULL + LATEST)
   ========================================================= */

/* -------------------------
   NAVBAR / BRANDING
   ------------------------- */

.acg-navbar {
    background-color: #0f172a; /* dark slate */
}

.acg-logo-square {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(135deg, #facc15, #f97316); /* yellow/orange */
}

.navbar-brand img {
    max-height: 48px;
    width: auto;
}

/* -------------------------
   LAYOUT CONTAINER
   ------------------------- */

.acg-main-container {
    max-width: 1440px;
    margin: 0 auto;
}

.acg-layout-row {
    align-items: flex-start;
}

/* Main content padding */
.acg-main-col {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* -------------------------
   FIXED SIDEBAR (DESKTOP)
   ------------------------- */

@media (min-width: 768px) {

    /* Sidebar column fixed to left */
    .acg-sidebar-col {
        font-size: 0.85rem;
        position: fixed;
        top: 56px; /* navbar height */
        left: 0;
        width: 260px;
        max-width: 260px;
        height: calc(100vh - 56px);
        padding: 0.75rem 0.75rem 1rem;
        z-index: 1020;
    }

    /* SHIFT MAIN CONTENT WHEN SIDEBAR IS PRESENT (no :has dependency) */
    @media (min-width: 768px) {
    body.acg-has-sidebar:not(.acg-sidebar-collapsed) .acg-main-container {
        margin-left: 260px;
    }

    body.acg-has-sidebar:not(.acg-sidebar-collapsed) .acg-main-col {
        border-left: 1px solid rgba(148, 163, 184, 0.18);
        min-width: 0; /* important: prevents wide tables/cards forcing overlap/overflow */
    }
    }
}

/* -------------------------
   SIDEBAR COLLAPSE MODE
   ------------------------- */

body.acg-sidebar-collapsed .acg-sidebar-col {
    display: none !important;
}

body.acg-sidebar-collapsed .acg-main-container {
    margin-left: 0 !important;
}

body.acg-sidebar-collapsed .acg-main-col {
    border-left: none !important;
}

/* -------------------------
   SIDEBAR CARD (FULL HEIGHT)
   ------------------------- */

.acg-sidebar-card {
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #072869);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;

    height: 90%;
    display: flex;
    flex-direction: column;
}

/* Sidebar header */
.acg-sidebar-header {
    background: rgba(15, 23, 42, 0.04);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    flex-shrink: 0;
}

.acg-sidebar-title {
    letter-spacing: 0.08em;
    color: #010a18;
    font-size: large;
}

/* Scrollable list area */
.acg-sidebar-list {
    flex: 1 1 auto; 
    overflow-y: auto;
}

/* Thin scrollbar styling */
.acg-sidebar-list::-webkit-scrollbar {
    width: 6px;
}
.acg-sidebar-list::-webkit-scrollbar-track {
    background: transparent;
}
.acg-sidebar-list::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.6);
    border-radius: 3px;
}

/* -------------------------
   SIDEBAR ITEMS
   ------------------------- */

.acg-sidebar-item {
    border: none;
    padding: 0.55rem 0.9rem;
    background-color: transparent;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease;
    font-weight: 500;
}

.acg-sidebar-item i {
    font-size: 1rem;
    opacity: 0.85;
}

.acg-sidebar-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: medium;
}

/* Hover state */
.acg-sidebar-item:hover {
    background: rgba(59, 130, 246, 0.06);
    color: #0f172a;
    transform: translateX(2px);
}

/* Active project item */
.acg-sidebar-item.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.acg-sidebar-item.active i,
.acg-sidebar-item.active .acg-sidebar-item-name {
    color: #ffffff;
}

/* -------------------------
   PROJECT STATUS BADGES
   ------------------------- */

.badge-status-active {
    background-color: #16a34a; /* green */
    color: #f9fafb;
    border-radius: 999px;
    font-size: .75rem;
    padding: 0.25rem 0.6rem;
}

.badge-status-estimate {
    background-color: #6b7280; /* gray */
    color: #f9fafb;
    border-radius: 999px;
    font-size: .75rem;
    padding: 0.25rem 0.6rem;
}

.badge-status-archived {
    background-color: #111827; /* near-black */
    color: #f9fafb;
    border-radius: 999px;
    font-size: .75rem;
    padding: 0.25rem 0.6rem;
}

/* -------------------------
   BREADCRUMBS
   ------------------------- */

.acg-breadcrumb-wrapper {
    background-color: #f9fafb;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.acg-breadcrumb {
    margin: 0;
    padding: 0.4rem 0;
    font-size: 1rem;
}

.acg-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #9ca3af;
}

.acg-breadcrumb a {
    text-decoration: none;
    color: #4b5563;
}

.acg-breadcrumb a:hover {
    text-decoration: underline;
}

/* -------------------------
   DASHBOARD SUMMARY CARDS
   ------------------------- */

.acg-summary-card {
    border: none;
    border-radius: 16px;
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.05);
}

.acg-summary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.acg-summary-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.acg-summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.0rem;
}

.acg-summary-footer {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

/* -------------------------
   FOOTER
   ------------------------- */

.acg-footer {
    background-color: #0f172a;
}

/* -------------------------
   MISC SMALL TWEAKS
   ------------------------- */

.card {
    border-radius: 12px;
}

.table {
    font-size: 0.9rem;
}

.btn-sm {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}
