@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary-color: #007bff; /* Azul DHGWEB */
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-color: #333;
    --border-radius: 8px;
}

/* Geral */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: var(--text-color);
}
.container {
    padding: 0 40px 40px 40px;
}
hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* Cabeçalho */
.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    flex-grow: 1;
}
.logo {
    height: 40px;
    margin-right: 20px;
}
.loader {
    font-weight: 700;
    color: var(--primary-color);
}

/* Layout de Colunas */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Duas colunas iguais */
    gap: 30px;
}
.column h2 {
    font-size: 20px;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.column .licenses-container {
    display: flex; 
    flex-direction: column;
    gap: 15px;
}
@media (max-width: 1000px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Cards de Licença */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 5px solid var(--primary-color);
    width: 100%;
    box-sizing: border-box;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.card h2 {
    margin-top: 0;
    font-size: 20px;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.detail strong {
    font-weight: 700;
    color: #555;
    display: inline-block;
    width: 100px;
}
.machine-status-empty {
    font-style: italic;
    color: var(--success-color);
    font-weight: 700;
}
.machine-status-used {
    color: var(--primary-color);
    font-weight: 500;
    word-break: break-all;
}

/* Status Tags */
.status-tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
}
.status-liberada { background-color: #d4edda; color: var(--success-color); }
.status-vencendo { background-color: #fff3cd; color: #856404; }
.status-ativa { background-color: #cfe2ff; color: var(--primary-color); }
.status-finalizada { background-color: #f8d7da; color: var(--danger-color); }

/* Botão de Ação */
.action-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 10px;
}
.action-button:hover {
    background-color: #0056b3;
}
.action-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
.edit-action { background-color: #6c757d; }
.reset-action { background-color: var(--danger-color); }
.reset-action:hover { background-color: #c82333; }

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); 
}
.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%; 
    max-width: 500px;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close-button:hover, .close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.input-full-width {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: 700;
}
.status-message.success { background-color: #d4edda; color: var(--success-color); }
.status-message.error { background-color: #f8d7da; color: var(--danger-color); }
.status-message.warning { background-color: #fff3cd; color: #856404; }

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}
.toast.show {
    visibility: visible;
    opacity: 1;
}