body {
    background-color: #f8f9fa;
    padding-top: 0;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    text-align: center;
    font-size: 2rem;
    margin: 0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.2rem;
    }

    nav.navbar .nav-link {
        margin: 0 0.5rem;
    }
}

nav.navbar {
    background-color: #2c3e50;
    padding: 0.75rem 0;
}

nav.navbar .nav-item {
    margin: auto 0;
}

nav.navbar .nav-link {
    margin: 0 1rem;
    transition: color 0.3s;
}

nav.navbar .nav-link:hover {
    color: #667eea !important;
}

nav.navbar .dropdown-menu a {
    margin: 0;
}

/* .breadcrumb-nav {
    background-color: white;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
} */

.breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.card-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.list-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background-color: #f9f9f9;
}

.list-item a {
    text-decoration: none;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.list-item-meta {
    font-size: 0.9rem;
    color: #999;
}

.detail-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
}

.detail-header h1 {
    margin: 0;
    font-size: 2rem;
}

.detail-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.detail-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-box .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-box .label {
    color: #999;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.location-card-link {
    color: inherit;
}

.location-card-link:hover {
    color: inherit;
}

.location-meta {
    max-width: 100%;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.45;
}

.location-meta-label {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
}

.location-address {
    margin-bottom: 0.75rem;
    color: #495057;
    word-break: break-word;
}

.location-room-count {
    font-weight: 500;
    color: #343a40;
}

th.actions-column {
    width: 200px;
}

#location-map {
    height: 350px;
}

@media (max-width: 992px) {
    th.actions-column {
        width: 160px;
    }
}

@media (max-width: 768px) {
    .detail-header,
    .detail-body {
        padding: 1.5rem;
    }

    .detail-header h1 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.9rem;
    }

    @media (max-width: 576px) {
        .location-meta {
            font-size: 0.9rem;
        }
    }

    #location-map {
        height: 220px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 1rem 0;
    }

    header h1 {
        font-size: 1rem;
        padding: 0 0.75rem;
        word-break: break-word;
    }

    nav.navbar {
        padding: 0.5rem 0;
    }

    nav.navbar .nav-link {
        margin: 0 0.25rem;
        font-size: 0.9rem;
    }

    .container-lg {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .detail-header,
    .detail-body {
        padding: 1rem;
    }

    .detail-section {
        margin-bottom: 1.5rem;
    }

    .detail-section h2 {
        font-size: 1.2rem;
        word-break: break-word;
    }

    .list-item {
        padding: 1rem;
        align-items: flex-start;
    }

    .list-item,
    .list-item a {
        flex-direction: column;
        gap: 0.75rem;
    }

    .list-item a {
        align-items: flex-start;
    }

    .list-item-title,
    .list-item-meta {
        word-break: break-word;
    }

    .list-item-actions {
        width: 100%;
        flex-direction: row;
        align-items: stretch;
        justify-content: end;
    }

    .list-item-actions .btn {
        width: fit-content;
    }

    .detail-actions {
        width: 100%;
    }

    .detail-actions .btn,
    .report-actions .btn,
    .form-actions .btn,
    .confirm-actions .btn {
        width: 100%;
    }

    .report-actions,
    .form-actions,
    .confirm-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table {
        font-size: 0.85rem;
    }

    th.actions-column {
        width: 120px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    #location-map {
        height: 180px;
    }
}

.formset-container .formset-row {
    border-bottom: 1px solid #ddd;
}

.formset-container .formset-row:last-child {
    border-bottom: none;
}

.formset-container select {
    min-width: 150px;
}

.formset-container input[type="checkbox"] {
    margin-top: 5px;
}
