/**
 * Semantic Framework CSS
 * Pure CSS with semantic class names - ZERO Bootstrap/Tailwind utility classes
 * 
 * @author Enterprise Development Team
 * @version 1.0.0
 */

/* ==========================================================================
   CSS RESET & BASE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   GRID SYSTEM - Semantic Names
   ========================================================================== */

.grid-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.grid-full {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

.grid-half {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.75rem;
}

.grid-third {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 0.75rem;
}

.grid-quarter {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 0.75rem;
}

.grid-two-thirds {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 0.75rem;
}

.grid-three-quarters {
    flex: 0 0 75%;
    max-width: 75%;
    padding: 0 0.75rem;
}

.grid-sixth {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    padding: 0 0.75rem;
}

.grid-five-sixths {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding: 0 0.75rem;
}


/* ==========================================================================
   RESPONSIVE GRID - Large Screens (992px+)
   ========================================================================== */

@media (min-width: 992px) {
    .grid-full-lg { flex: 0 0 100%; max-width: 100%; }
    .grid-half-lg { flex: 0 0 50%; max-width: 50%; }
    .grid-third-lg { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .grid-quarter-lg { flex: 0 0 25%; max-width: 25%; }
    .grid-two-thirds-lg { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .grid-three-quarters-lg { flex: 0 0 75%; max-width: 75%; }
    .grid-sixth-lg { flex: 0 0 16.666667%; max-width: 16.666667%; }
}

/* ==========================================================================
   RESPONSIVE GRID - Medium Screens (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .grid-full-md { flex: 0 0 100%; max-width: 100%; }
    .grid-half-md { flex: 0 0 50%; max-width: 50%; }
    .grid-third-md { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .grid-quarter-md { flex: 0 0 25%; max-width: 25%; }
    .grid-two-thirds-md { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .grid-three-quarters-md { flex: 0 0 75%; max-width: 75%; }
}

/* ==========================================================================
   RESPONSIVE GRID - Small Screens (576px+)
   ========================================================================== */

@media (min-width: 576px) {
    .grid-full-sm { flex: 0 0 100%; max-width: 100%; }
    .grid-half-sm { flex: 0 0 50%; max-width: 50%; }
    .grid-third-sm { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .grid-quarter-sm { flex: 0 0 25%; max-width: 25%; }
}

/* ==========================================================================
   RESPONSIVE GRID - Extra Large Screens (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    .grid-full-xl { flex: 0 0 100%; max-width: 100%; }
    .grid-half-xl { flex: 0 0 50%; max-width: 50%; }
    .grid-third-xl { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .grid-quarter-xl { flex: 0 0 25%; max-width: 25%; }
}

/* ==========================================================================
   CONTAINER
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.container-wide {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}


/* ==========================================================================
   CONTEXTUAL LAYOUT COMPONENTS
   ========================================================================== */

/* Settings Form Layout */
.settings-form {
    display: flex;
    flex-direction: column;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.settings-label {
    flex: 0 0 200px;
    padding-top: 0.5rem;
    padding-right: 1rem;
    font-weight: 500;
    text-align: right;
}

.settings-field {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .settings-row {
        flex-direction: column;
    }
    .settings-label {
        flex: none;
        width: 100%;
        text-align: left;
        margin-bottom: 0.5rem;
    }
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #1a1a2e;
    color: #ffffff;
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
    background: #f8f9fa;
}

@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    .admin-sidebar.active {
        left: 0;
    }
}

/* Footer Layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-column {
    display: flex;
    flex-direction: column;
}

/* Content Sections */
.content-section {
    margin-bottom: 2rem;
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-body {
    padding: 1rem 0;
}


/* ==========================================================================
   FORM COMPONENTS
   ========================================================================== */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #212529;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    appearance: none;
}

.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.form-check-label {
    margin: 0;
    cursor: pointer;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
}

.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.button:disabled,
.button.disabled {
    pointer-events: none;
    opacity: 0.65;
}

.button-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.button-primary:hover {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.button-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.button-secondary:hover {
    color: #fff;
    background-color: #5c636a;
    border-color: #565e64;
}

.button-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.button-success:hover {
    color: #fff;
    background-color: #157347;
    border-color: #146c43;
}

.button-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.button-danger:hover {
    color: #fff;
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.button-warning {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
}

.button-warning:hover {
    color: #000;
    background-color: #ffca2c;
    border-color: #ffc720;
}

.button-info {
    color: #000;
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.button-info:hover {
    color: #000;
    background-color: #31d2f2;
    border-color: #25cff2;
}

.button-dark {
    color: #fff;
    background-color: #212529;
    border-color: #212529;
}

.button-dark:hover {
    color: #fff;
    background-color: #1c1f23;
    border-color: #1a1e21;
}

.button-light {
    color: #000;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.button-light:hover {
    color: #000;
    background-color: #d3d4d5;
    border-color: #c6c7c8;
}

.button-link {
    font-weight: 400;
    color: #0d6efd;
    background-color: transparent;
    border-color: transparent;
    text-decoration: underline;
}

.button-link:hover {
    color: #0a58ca;
}

.button-outline {
    color: #0d6efd;
    background-color: transparent;
    border-color: #0d6efd;
}

.button-outline:hover {
    color: #fff;
    background-color: #0d6efd;
}

.button-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.button-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

.button-icon {
    padding: 0.5rem;
    line-height: 1;
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
}

.card-header {
    padding: 1rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header:first-child {
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.card-footer {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.card-footer:last-child {
    border-radius: 0 0 calc(0.375rem - 1px) calc(0.375rem - 1px);
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 500;
}

.card-text {
    margin-bottom: 0;
}

.card-img-top {
    width: 100%;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

/* ==========================================================================
   PANELS (Alternative to Cards)
   ========================================================================== */

.panel {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

.panel-body {
    padding: 1.25rem;
}

.panel-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}


/* ==========================================================================
   ALERTS / MESSAGES
   ========================================================================== */

.alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger,
.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1rem;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    opacity: 0.5;
}

.alert-close:hover {
    opacity: 1;
}

/* ==========================================================================
   BADGES / LABELS / TAGS
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-primary {
    background-color: #0d6efd;
}

.badge-secondary {
    background-color: #6c757d;
}

.badge-success {
    background-color: #198754;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-warning {
    color: #000;
    background-color: #ffc107;
}

.badge-info {
    color: #000;
    background-color: #0dcaf0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    background-color: #e9ecef;
    border-radius: 1rem;
}


/* ==========================================================================
   TABLES
   ========================================================================== */

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-color: #dee2e6;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-align: left;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-item {
    margin-bottom: 0;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.nav-link:hover,
.nav-link:focus {
    color: #0a58ca;
}

.nav-link.active {
    color: #0d6efd;
    font-weight: 500;
}

.nav-link.disabled {
    color: #6c757d;
    pointer-events: none;
    cursor: default;
}

.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.navbar-brand {
    padding: 0.3125rem 0;
    margin-right: 1rem;
    font-size: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    width: 250px;
    background-color: #1a1a2e;
    color: #ffffff;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-item {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.sidebar-item:hover,
.sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

body.sidebar-open .sidebar-overlay {
    display: block;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    color: #6c757d;
    content: "/";
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}


/* ==========================================================================
   MODALS
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal.active .modal-dialog {
    pointer-events: auto;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
}

.modal-lg .modal-dialog {
    max-width: 800px;
}

.modal-sm .modal-dialog {
    max-width: 300px;
}

.modal-xl .modal-dialog {
    max-width: 1140px;
}

/* ==========================================================================
   DROPDOWNS
   ========================================================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-menu {
    position: absolute;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e2125;
    background-color: #e9ecef;
}

.dropdown-item.active,
.dropdown-item:active {
    color: #fff;
    background-color: #0d6efd;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-header {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}


/* ==========================================================================
   COLLAPSE / ACCORDION
   ========================================================================== */

.collapse {
    display: block;
}

.collapse.collapsed {
    display: none;
}

.accordion {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.accordion-item {
    border-bottom: 1px solid #dee2e6;
}

.accordion-item:last-child {
    border-bottom: 0;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    background-color: #fff;
    border: 0;
    border-radius: 0;
    overflow-anchor: none;
    cursor: pointer;
}

.accordion-button:not(.collapsed) {
    color: #0c63e4;
    background-color: #e7f1ff;
}

.accordion-button::after {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    content: "";
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    transition: transform 0.2s ease-in-out;
}

.accordion-button.active::after {
    transform: rotate(-180deg);
}

.accordion-body {
    padding: 1rem 1.25rem;
}

/* ==========================================================================
   TABS
   ========================================================================== */

.tabs {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    border-bottom: 1px solid #dee2e6;
}

.tab-item {
    margin-bottom: -1px;
}

.tab-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    background: none;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    cursor: pointer;
}

.tab-link:hover,
.tab-link:focus {
    border-color: #e9ecef #e9ecef #dee2e6;
    isolation: isolate;
}

.tab-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.tab-content {
    padding: 1rem 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ==========================================================================
   TOOLTIPS
   ========================================================================== */

[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #fff;
    background-color: #212529;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
    z-index: 1070;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}


/* ==========================================================================
   UTILITY - VISIBILITY / DISPLAY (Semantic Names)
   ========================================================================== */

.hidden {
    display: none !important;
}

.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}

/* ==========================================================================
   UTILITY - TEXT
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #6c757d;
}

/** Primary text color */
.text-color-primary {
    color: #0d6efd;
}

/** Success text color */
.text-color-success {
    color: #198754;
}

/** Danger/error text color */
.text-color-danger {
    color: #dc3545;
}

/** Warning text color */
.text-color-warning {
    color: #ffc107;
}

.text-info {
    color: #0dcaf0;
}

.text-dark {
    color: #212529;
}

.text-light {
    color: #f8f9fa;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   UTILITY - STATES
   ========================================================================== */

.active {
    /* Used contextually by JS */
}

.disabled {
    pointer-events: none;
    opacity: 0.65;
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: -0.75rem;
    margin-left: -0.75rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@media (max-width: 575.98px) {
    .hidden-xs { display: none !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .hidden-sm { display: none !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-md { display: none !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .hidden-lg { display: none !important; }
}

@media (min-width: 1200px) {
    .hidden-xl { display: none !important; }
}

/* Show only on specific breakpoints */
@media (min-width: 576px) {
    .visible-xs-only { display: none !important; }
}

@media (max-width: 575.98px) {
    .visible-xs-only { display: block !important; }
}

@media (max-width: 767.98px) {
    .visible-md-up { display: none !important; }
}

@media (min-width: 768px) {
    .visible-md-up { display: block !important; }
}

@media (max-width: 991.98px) {
    .visible-lg-up { display: none !important; }
}

@media (min-width: 992px) {
    .visible-lg-up { display: block !important; }
}

/* ==========================================================================
   IMAGES
   ========================================================================== */

.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    padding: 0.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    max-width: 100%;
    height: auto;
}

.rounded-circle {
    border-radius: 50%;
}

/* ==========================================================================
   SPINNER / LOADING
   ========================================================================== */

.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */

.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #0d6efd;
    transition: width 0.6s ease;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}

.page-item {
    margin: 0;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    color: #0d6efd;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.page-link:hover {
    z-index: 2;
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}
