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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Header */
.header {
    background: #dc2626;
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-left p {
    font-size: 0.875rem;
    opacity: 0.95;
}

.header-right {
    text-align: right;
}

.time {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: monospace;
}

.date {
    font-size: 0.875rem;
    opacity: 0.95;
    margin-top: 0.25rem;
}

/* Main */
.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 2rem 1rem;
}

/* Message */
.message {
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.message.success {
    color: #059669;
    border-left: 4px solid #059669;
}

.message.error {
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card h2 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
}

/* PIN Display */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pin-box {
    width: 50px;
    height: 50px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1f2937;
    background: white;
}

/* Keypad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.key {
    padding: 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    color: #1f2937;
}

.key:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.key:active {
    transform: translateY(0);
}

.key-clear {
    background: #fee2e2;
    color: #dc2626;
    font-size: 1rem;
}

.key-clear:hover {
    background: #fecaca;
}

.key-submit {
    background: #dc2626;
    color: white;
    font-size: 1.75rem;
}

.key-submit:hover {
    background: #b91c1c;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

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

.btn-entry {
    background: #d1d5db;
    color: #374151;
}

.btn-entry:hover {
    background: #9ca3af;
}

.btn-exit {
    background: #d1d5db;
    color: #374151;
}

.btn-exit:hover {
    background: #9ca3af;
}

/* Admin Link */
.admin-link {
    display: block;
    text-align: center;
    color: #6b7280;
    text-decoration: underline;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.admin-link:hover {
    color: #374151;
}

/* Responsive */
@media (max-width: 640px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-right {
        text-align: center;
    }
    
    .card {
        padding: 2rem 1.5rem;
    }
    
    .pin-box {
        width: 45px;
        height: 45px;
    }
    
    .key {
        padding: 1rem;
        font-size: 1.25rem;
    }
}
