/* --- Estrutura Principal --- */
#gbc-app-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 600px;
    margin: 20px auto;
    padding: 15px;
    background-color: #f0f2f5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.gbc-title {
    text-align: center;
    color: #1c1e21;
    font-size: 24px;
    margin-bottom: 25px;
}

.gbc-screen {
    width: 100%;
}

/* --- Overlay de Carregamento --- */
#gbc-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gbc-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: gbc-spin 1s linear infinite;
}

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

/* --- Botões --- */
.gbc-btn {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent; /* Remove o brilho do toque no iOS */
}

.gbc-btn:active {
    transform: scale(0.98);
}

.gbc-button-group .gbc-btn {
    margin-bottom: 10px;
}

.gbc-btn-primary {
    background-color: #007bff;
    color: white;
}
.gbc-btn-primary:hover {
    background-color: #0056b3;
}

.gbc-btn-secondary {
    background-color: #6c757d;
    color: white;
}
.gbc-btn-secondary:hover {
    background-color: #5a6268;
}

.gbc-btn-back {
    background: none;
    border: none;
    color: #007bff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 15px;
    padding: 0;
    width: auto;
}

.gbc-btn-copy {
    background-color: #28a745;
    color: white;
}
.gbc-btn-copy:hover {
    background-color: #218838;
}

.gbc-btn-action {
    background-color: #ffc107;
    color: #212529;
}
.gbc-btn-action:hover {
    background-color: #e0a800;
}

/* --- Filtros --- */
.gbc-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.gbc-filters input[type="date"],
.gbc-filters select {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
}

.gbc-filters .gbc-btn {
    flex-shrink: 0;
    width: auto;
    padding: 10px 15px;
}

/* --- Área da Lista --- */
.gbc-list-area {
    margin-bottom: 15px;
}

#gbc-list-output {
    width: 100%;
    height: 300px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 14px;
    background-color: #f9f9f9;
    resize: vertical;
    white-space: pre;
}

/* --- Ações da Lista --- */
.gbc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* --- Modal --- */
#gbc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

#gbc-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    position: relative;
}

.gbc-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.gbc-modal-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1c1e21;
}

#gbc-modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

#gbc-modal-content input[type="number"],
#gbc-modal-content select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 20px;
}

.gbc-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.gbc-button-group-horizontal {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}
