:root {
    font-size: 16px;
}

body {
    font-size: 1rem;
    background-color: #f4f6f9;
}

.sidebar {
    height: 100vh;
    background: #343a40;
    color: #fff;
    position: fixed;
    width: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    z-index: 1045;
}

.sidebar a {
    color: #adb5bd;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
}

.sidebar a:hover {
    background: #495057;
    color: #fff;
}

.sidebar .active {
    background: #0d6efd;
    color: #fff;
}

.sidebar .nav-link {
    transition: all 0.2s;
    border-radius: 6px;
    margin: 2px 0;
    font-size: 0.95rem;
}

.sidebar .nav-link i {
    color: #ffc107;
    font-size: 1.1rem;
}

.content-wrapper {
    margin-left: 260px;
    padding: 20px;
}

.sidebar-backdrop {
    display: none;
}

.mobile-menu-btn {
    display: none;
}

.navbar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.card {
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.form-control,
.form-select {
    border-radius: 6px;
}

label {
    font-weight: 600;
    margin-bottom: 5px;
}

.app-footer {
    margin-top: 1.5rem;
    padding: 0.75rem 0 0.25rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.muted {
    color: #6c757d;
}

.auth-body {
    background: linear-gradient(135deg, #f8fbff, #eef4ff);
    min-height: 100vh;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-card {
    width: min(720px, 96vw);
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dce5f3;
    box-shadow: 0 8px 24px rgba(19, 36, 58, 0.08);
    padding: 0;
}

.auth-card .auth-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.auth-card .auth-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
}

.auth-card .form-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.auth-card .form-control {
    font-size: 0.95rem;
}

.auth-card .btn {
    font-weight: 600;
}

.btn-action {
    min-width: 86px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    line-height: 1.2;
}

.btn-geom {
    width: 112px;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    line-height: 1 !important;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: middle;
    flex: 0 0 auto;
    align-self: center;
}

/* Buttons inside forms sometimes render taller than <a> buttons depending on UA defaults.
   Force identical geometry for Analyze/Edit/Delete action buttons. */
.project-action-form {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.project-action-form .btn.btn-geom,
.project-action-form button.btn.btn-geom,
.project-action-form input.btn.btn-geom {
    width: 112px;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.btn-geom i {
    font-size: 0.95em;
    line-height: 1;
    display: inline-block;
}

.btn-geom span {
    line-height: 1;
}

.project-action-form { margin: 0 !important; }

/* Professional collapsible sections */
details > summary {
    cursor: pointer;
}

details > summary::-webkit-details-marker {
    display: none;
}

details > summary {
    list-style: none;
    position: relative;
    padding-right: 1.25rem;
}

details > summary::after {
    content: "▾";
    position: absolute;
    right: 0;
    top: 0.05rem;
    color: #6c757d;
    font-size: 0.95em;
    transition: transform 0.12s ease;
}

details[open] > summary::after {
    transform: rotate(180deg);
}

.ui-compact {
    font-size: 0.88rem;
}

.ui-compact .form-control,
.ui-compact .form-select {
    font-size: 0.88rem;
}

.ui-compact label,
.ui-compact .form-label {
    font-size: 0.80rem;
}

.ui-compact .table {
    font-size: 0.88rem;
}

.ui-compact-form {
    font-size: 0.84rem;
}

.ui-compact-form .form-control,
.ui-compact-form .form-select {
    font-size: 0.84rem;
}

.ui-compact-form label,
.ui-compact-form .form-label {
    font-size: 0.72rem;
    line-height: 1.15;
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.ui-project-form label,
.ui-project-form .form-label {
    font-size: 0.82rem;
    line-height: 1.15;
}

.ui-user-form label,
.ui-user-form .form-label {
    font-size: 0.82rem;
    line-height: 1.15;
}

.btn-cute {
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(19, 36, 58, 0.10);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-cute:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(19, 36, 58, 0.14);
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .content-wrapper {
        margin-left: 0;
        padding: 12px;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1040;
    }
}
