* {
    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;
    padding: 20px;
}

/* Tela de PIN */
.pin-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.pin-container {
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 400px;
}

.pin-logo {
    font-size: 4rem;
    margin-bottom: 20px;
}

.pin-container h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.pin-subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1rem;
}

.pin-input {
    width: 200px;
    padding: 15px;
    font-size: 2rem;
    text-align: center;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2c3e50;
    letter-spacing: 15px;
    margin-bottom: 20px;
    font-weight: bold;
}

.pin-input:focus {
    outline: none;
    border-color: #5568d3;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-pin {
    width: 200px;
    padding: 15px !important;
    font-size: 1.1rem !important;
}

.pin-error {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 0.95rem;
    min-height: 20px;
    font-weight: 600;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.kpi-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.kpi-item {
    text-align: center;
}

.kpi-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.kpi-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.actions-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.order-card {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.order-card.sla-green {
    border-left: 6px solid #27ae60;
}

.order-card.sla-yellow {
    border-left: 6px solid #f39c12;
}

.order-card.sla-red {
    border-left: 6px solid #e74c3c;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.order-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
}

.order-pager {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.order-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tag-responsavel {
    background: #9b59b6;
    color: white;
}

.tag-status {
    color: white;
}

.tag-status.novo {
    background: #9b59b6;
}

.tag-status.em-preparo {
    background: #3498db;
}

.tag-status.pausado {
    background: #e67e22;
}

.tag-status.pronto {
    background: #27ae60;
}

.tag-status.cancelado {
    background: #e74c3c;
}

.tag-tipo {
    color: white;
}

.tag-tipo.balcao-comer {
    background: #16a085;
}

.tag-tipo.balcao-levar {
    background: #2980b9;
}

.tag-tipo.ifood {
    background: #c0392b;
}

.order-time {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #2c3e50;
    margin: 15px 0;
}

.order-observacao {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #555;
}

.order-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

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

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

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

.assign-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.assign-btn {
    padding: 15px;
    background: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.assign-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.history-container {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 1.2rem;
}
