:root {
    --background-color: #fbfbfb;
    --primary-color: #112638;
    --secondary-color: #FAA701;
    --accent-color: #FAA701;
    --light-color: #F5F9FF;
    --dark-color: #1F1F1F;
    --error-color: #FF4646;
    --success-color: #2FFFA0;
    --border-color: #DBDBDB;
    --text-color: #5F5F5F;
    --text-light: #5F5F5F;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.content-box {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.content-box h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 26px;
}

.content-box h1 span {
    color: var(--text-color);
    font-weight: 400;
    font-size: 14px;
}

/* Alert Box */
.alert-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-header h3 {
    margin: 0;
    color: #856404;
}

/* Form Styles */
.form-container {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.filter-options{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.filter-options .form-group{
    margin-bottom: 0px !important;
}
.history-actions{
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}


    /* Info Grid */
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
        background: #f8f9fa;
        border: 1px solid var(--border-color);
        padding: 15px;
        border-radius: 4px;
    }

    .info-item {
        display: flex;
        flex-direction: column;
        padding: 10px;
        background: white;
        border-radius: 4px;
        border: 1px solid var(--border-color);
    }

    .info-label {
        font-size: 0.9rem;
        color: var(--dark-color);
        margin-bottom: 5px;
    }

    .info-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--primary-color);
    }



    /* Limit exceeded */
    .linha-limite-ultrapassado {
        background-color: #f8d7da;
    }

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    flex: 1 1 calc(33% - 20px);
    min-width: 250px;
}

.form-group label {
    font-size: 0.9em;
    display: block;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-check {
    flex-direction: column-reverse;
    width: 100%;
    align-items: flex-start;
}

.form-check input {
    width: fit-content !important;
}

/* Buttons */
.button-container {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-primary {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary {
    padding: 10px 20px;
    text-decoration: none;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-sync {
    padding: 10px 20px;
    text-decoration: none;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-danger {
    padding: 10px 20px;
    text-decoration: none;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Filter Button */
.btn-filter {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.btn-filter:hover {
    background: var(--secondary-color);
}

.btn-filter.active {
    background: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sync:hover {
    background: #dd9300;
}

/* Search */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px
}

.search-container input {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.search-counter {
    font-size: 0.9rem;
    color: #666;
    margin-left: auto;
    white-space: nowrap;
}

/* Table */
.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

.actions {
    display: flex;
    gap: 12px;
}

.actions a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
}

.actions a:hover {
    color: var(--secondary-color);
}

/* Pagination */
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination button {
    padding: 8px 16px;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination button:hover {
    background: #e0e0e0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.open {
    visibility: visible;
    opacity: 1;
}

.modal {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    color: #666;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Error */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}

.error-content {
    max-width: 700px;
    width: 100%;
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.error-icon {
    font-size: 72px;
    color: var(--error-color);
    margin-bottom: 15px;
}

.error-content h1 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 28px;
}

.error-message {
    font-size: 18px;
    color: var(--error-color);
    margin-bottom: 25px;
    font-weight: 400;
}

.error-message span {
    font-weight: 600;
    color: var(--text-color);
}

.access-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.access-period h3,
.current-time h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.access-period h3 i {
    color: var(--success-color);
}

.period-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.days-section,
.time-section {
    margin-bottom: 15px;
}

.days-section h4,
.time-section h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
    font-size: 16px;
}

.days-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.day-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.day-pill.allowed {
    background-color: var(--sucess-color);
    color: white;
}

.day-pill.not-allowed {
    background-color: #e0e0e0;
    color: #7f8c8d;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-box {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    min-width: 70px;
    text-align: center;
}

.time-separator {
    color: #7f8c8d;
}

.current-time {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.time-now {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
    display: inline-block;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Two Column Layout */
.two-column-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.column {
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 15px;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

/* Form styles */
.form-create-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

select.form-control {
    height: auto;
    padding: 8px 12px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    flex-direction: row;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.action-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #eee;
    gap: 15px;
}

.counter-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.counter-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form styles */
.form-edit-group {
    margin-bottom: 30px;
}

/* Table */
.table-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
}

/* Status Badge */
.status-badge {
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #d4edda;
    color: #10b981
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: var(--error-color);
}
.status-badge.progress {
    background-color: #f8f3d7;
    color: var(--accent-color);
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-action:hover {
    color: var(--secondary-color);
}

.btn-action i {
    font-size: 0.9rem;
}

.flash-container {
    width: 100%;
    margin-bottom: 40px;
}

.flash-message {
    display: flex;
    align-items: center;
    background-color: #fef2f2;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 15px 20px;
    border-radius: 4px;
}

.flash-icon {
    margin-right: 15px;
    font-size: 20px;
    color: var(--error-color);
}

.flash-content p {
    margin: 0;
    font-size: 15px;
}

.flash-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 18px;
    color: var(--error-color);
    transition: color 0.2s;
}

.flash-close:hover {
    color: #7f1d1d;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-container {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .error-content {
        padding: 20px;
    }

    .error-icon {
        font-size: 56px;
    }

    .period-details {
        flex-direction: column;
    }

    .error-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .form-group {
        flex: 1 1 100%;
    }

    .button-container {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
        gap: 8px;
    }

    .search-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-counter {
        margin-left: 0;
        margin-top: 5px;
    }

    .btn-filter {
        width: 100%;
        margin-top: 10px;
    }
}