/* akPress Application Styles */

/* Dense tables: use Bootstrap's table-sm by default */
.table {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.table-sm {
    font-size: 0.8125rem;
}

/* Sticky table header */
.table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

/* Dark mode support for sticky header */
@media (prefers-color-scheme: dark) {
    .table thead th {
        background-color: #495057;
        color: #fff;
    }
}

/* Max-width container rule */
.container-fluid {
    max-width: 1600px;
}

/* Muted BS date helper style */
.bs-date-helper {
    font-size: 0.875rem;
    color: #6c757d;
    display: block;
    margin-top: 0.25rem;
}

/* Form field styling for date preview */
.bs-preview-output {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Breadcrumb bar styling */
.breadcrumb-bar {
    position: sticky;
    top: 56px;
    z-index: 20;
}

/* Navbar adjustments */
.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0;
}

/* Info boxes and cards */
.card {
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
}

/* Status badge tweaks */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}

/* Form validation feedback */
.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

/* Disable styling for nav links */
.nav-link.disabled {
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

/* Toast positioning for fixed navbar */
@media (min-width: 992px) {
    .toast-container {
        right: 1rem !important;
        top: 70px !important;
    }
}

/* Minimal transitions */
a, button, .btn {
    transition: all 0.15s ease-in-out;
}

/* Responsive padding for content */
.main-content {
    padding-top: 1rem;
    min-height: calc(100vh - 300px);
}

/* Stat tile styling */
.stat-tile {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

.stat-tile h3 {
    font-size: 2rem;
    font-weight: 300;
    margin: 0;
    color: #212529;
}

.stat-tile p {
    margin: 0.5rem 0 0 0;
    color: #6c757d;
    font-size: 0.875rem;
}

@media (prefers-color-scheme: dark) {
    .stat-tile {
        background: #2d3035;
        border-color: #495057;
    }

    .stat-tile h3 {
        color: #e9ecef;
    }
}

.container-wide {
    max-width: 1600px;
}

.content-padded {
    padding: 20px;
}

.main-content {
    margin-top: 0;
}

.main-content--with-navbar {
    margin-top: 110px;
}

/* ===== Design System: Accent & Cards ===== */

:root {
    --ak-accent: #0f766e;
    --ak-accent-dark: #0c5f59;
}

/* Accent-colored primary buttons */
.btn-primary {
    background-color: var(--ak-accent);
    border-color: var(--ak-accent);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--ak-accent-dark);
    border-color: var(--ak-accent-dark);
}

/* Active nav link accent */
.navbar-nav .nav-link.active,
.navbar-brand {
    color: var(--ak-accent) !important;
}

.navbar-nav .nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.4rem;
    text-decoration-thickness: 2px;
}

/* Page heading with accent underline */
.page-heading {
    font-weight: 600;
    color: #212529;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--ak-accent);
    display: inline-block;
}

/* Card wrapper for content sections */
.ak-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 1.25rem;
}

/* Compact filter controls: Label: [control] */
.filter-form .col-auto {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-form .col-auto > label {
    margin-bottom: 0;
    font-weight: 600;
    white-space: nowrap;
}

.filter-form .form-control,
.filter-form .form-select,
.filter-form .ts-wrapper {
    min-width: 180px;
}

.filter-form .form-control,
.filter-form .form-select,
.filter-form .ts-wrapper.single .ts-control,
.filter-form .ts-wrapper.multi .ts-control {
    border-color: #000;
}

/* Keep searchable select menus above sticky table headers and card/table chrome. */
.ts-wrapper {
    position: relative;
}

.ts-wrapper.dropdown-active {
    z-index: 1060;
}

.ts-dropdown {
    z-index: 1061 !important;
}
