/* ============================================
   SISTEMA DE PONTO - ESTILOS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ============ LOGIN ============ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.login-box .logo {
    font-size: 64px;
    margin-bottom: 20px;
}

.login-box h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-box .subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ============ MAIN PAGE ============ */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.header-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.employee-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.employee-details h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 5px;
}

.employee-details .role {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.employee-details .schedule {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

.clock-display {
    margin-left: auto;
    text-align: right;
}

.clock-time {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    font-family: 'Courier New', monospace;
}

.clock-date {
    color: #888;
    font-size: 14px;
}

.logout-btn {
    margin-top: 15px;
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
}

.logout-btn:hover {
    background: #e0e0e0;
}

/* ============ ACTION BUTTONS ============ */
.actions-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.action-btn {
    padding: 30px;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-btn .icon {
    font-size: 40px;
}

.action-btn.ponto {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.action-btn.plantao {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.action-btn .next-action {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

/* ============ STATS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-card .label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.stat-card.positive .value { color: #11998e; }
.stat-card.negative .value { color: #f5576c; }
.stat-card.neutral .value { color: #667eea; }

/* ============ HISTORY ============ */
.history-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

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

.history-header h3 {
    color: #333;
    font-size: 20px;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.month-nav button {
    width: 36px;
    height: 36px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.month-nav button:hover {
    background: #667eea;
    color: white;
}

.month-nav span {
    font-weight: 600;
    color: #333;
    min-width: 150px;
    text-align: center;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 12px;
    background: #f8f9fa;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.history-table tr:hover {
    background: #f8f9fa;
}

.history-empty {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* ============ BADGES ============ */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge.entrada {
    background: #d4edda;
    color: #155724;
}

.badge.saida {
    background: #f8d7da;
    color: #721c24;
}

.badge.ponto {
    background: #cce5ff;
    color: #004085;
}

.badge.plantao {
    background: #fff3cd;
    color: #856404;
}

/* ============ MODAL ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 22px;
}

.modal .modal-subtitle {
    color: #666;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions .btn {
    flex: 1;
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 3000;
    max-width: 350px;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.toast.error {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ ADMIN STYLES ============ */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    color: #333;
    font-size: 24px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #667eea;
    color: white;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.admin-stat-card .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.admin-stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.admin-stat-card .label {
    color: #888;
    font-size: 14px;
}

.admin-panel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-panel h2 {
    color: #333;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
}

.data-table th {
    text-align: left;
    padding: 14px;
    background: #f8f9fa;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-edit {
    background: #667eea;
    color: white;
    margin-right: 5px;
}

.btn-delete {
    background: #f5576c;
    color: white;
}

.status-active {
    color: #11998e;
    font-weight: 600;
}

.status-inactive {
    color: #f5576c;
    font-weight: 600;
}

/* Filter form */
.filter-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form .form-group {
    margin-bottom: 0;
}

.filter-form input,
.filter-form select {
    padding: 10px 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .employee-info {
        flex-direction: column;
        text-align: center;
    }
    
    .clock-display {
        margin-left: 0;
        text-align: center;
        margin-top: 20px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .history-table {
        font-size: 14px;
    }
    
    .history-table th,
    .history-table td {
        padding: 10px 8px;
    }
    
    .modal {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .clock-time {
        font-size: 36px;
    }
}
