/* ==========================================================================
   1. RESET & CONFIGURAÇÕES BASE (MOBILE FIRST)
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Exceções: Permite minúsculas/maiúsculas normais em e-mails e senhas */
input[type="email"], 
input[type="password"], 
.lowercase {
    text-transform: none !important;
}

body {
    background-color: #f4f6f8;
    color: #222;
    font-size: 14px;
    line-height: 1.4;
    padding-bottom: 30px;
}

/* ==========================================================================
   2. CABEÇALHO & NAVEGAÇÃO POR ABAS
   ========================================================================== */
header {
    background-color: #0056b3;
    color: #ffffff;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-align: center;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    transition: background 0.2s ease;
}

nav a:active,
nav a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

nav a.active {
    background-color: #ffffff;
    color: #0056b3;
}

nav a.sair {
    background-color: #dc3545;
    color: #ffffff;
    flex: 1 1 100%;
}

/* ==========================================================================
   3. ESTRUTURA DOS CARDS & CONTAINER
   ========================================================================== */
.container {
    width: 100%;
    padding: 12px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 15px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1rem;
    color: #0056b3;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   4. FORMULÁRIOS & CUSTOMIZAÇÃO DO RELÓGIO E CALENDÁRIO
   ========================================================================== */
.fluid-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: #495057;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    background-color: #ffffff;
    color: #333;
}

.form-control:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* Estilo do Relógio e Calendário no Celular */
input[type="time"],
input[type="date"] {
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #0056b3;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
}

input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

input[type="time"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%230056b3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 35px;
}

input[type="date"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%230056b3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 35px;
}

/* ==========================================================================
   5. BOTÕES & TABELAS
   ========================================================================== */
.btn {
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-primary { background-color: #0056b3; color: #fff; }
.btn-warning { background-color: #ffc107; color: #212529; }
.btn-outline { background: transparent; border: 1px solid #0056b3; color: #0056b3; }

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

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th, td {
    padding: 10px;
    text-align: left;
    font-size: 0.8rem;
    border-bottom: 1px solid #e9ecef;
}

th { background-color: #f8f9fa; color: #495057; }

.badge {
    background: #6c757d;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* ==========================================================================
   6. MEDIA QUERIES (TABLET & DESKTOP)
   ========================================================================== */
@media (min-width: 600px) {
    .fluid-grid { grid-template-columns: repeat(2, 1fr); }
    .col-full { grid-column: span 2; }
    nav a { flex: 0 1 auto; }
    nav a.sair { flex: 0 1 auto; }
    .btn { width: auto; }
}

@media (min-width: 900px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 30px;
    }
    header h1 { text-align: left; }
    .container { max-width: 1100px; padding: 20px; }
    .fluid-grid { grid-template-columns: repeat(4, 1fr); }
    .col-full { grid-column: span 4; }
}

/* ==========================================================================
   7. IMPRESSÃO
   ========================================================================== */
@media print {
    header, .no-print, .btn { display: none !important; }
    body { background: #fff !important; }
    .container { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .card { box-shadow: none !important; padding: 0 !important; }
    table { border: 1px solid #000; }
    th, td { border: 1px solid #000; padding: 6px; }
}