/*
 * Yemek ve Giriş-Çıkış Takip Sistemi - Tasarım Sistemi (css/style.css)
 * Stil Modu: Technical Sharp Minimal (Techno-Brutalist esintili, keskin ve premium tasarım)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    /* Renk Paleti (Mor yasaktır, Fintech Mavisi yerine keskin teknik renkler tercih edilmiştir) */
    --bg-dark: #09090b;          /* Derin siyah-karbon arka plan */
    --bg-card: #121214;          /* Kartlar için koyu gri */
    --bg-input: #1a1a1e;         /* Input ve tuş takımı arka planı */
    --border-color: #2a2a32;     /* Teknik ince çizgiler */
    --border-active: #ff7a00;    /* Odaklanmış/Etkin Turuncu-Kehribar */
    
    --text-primary: #ffffff;     /* Beyaz birincil metin */
    --text-secondary: #8e8e9f;   /* Yardımcı gri metin */
    --text-muted: #4e4e5a;       /* Sönük detay metni */

    /* Durum Renkleri */
    --color-success: #00e676;    /* Geri döndüm / Başarılı (Zümrüt Yeşili) */
    --color-warning: #ff3d00;    /* Yemeğe çıkıyorum (Canlı Kehribar/Kırmızı) */
    --color-sync: #29b6f6;       /* Senkronizasyon (Canlı Açık Mavi) */
    
    /* Font Tanımları */
    --font-sans: 'Outfit', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Keskinlik Ayarı (Safe Boredom olan 6-8px yuvarlaklık yerine keskin 0px tercih edilmiştir) */
    --radius-sharp: 0px;
    --radius-pad: 2px;
}

/* Sayfa Sıfırlama ve Temel Kurallar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 16px;
    /* Teknik ince çizgi deseni (Visual Depth için grain/grid hissi) */
    background-image: 
        linear-gradient(rgba(42, 42, 50, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 42, 50, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Ana Konteyner */
.app-container {
    width: 100%;
    max-width: 420px;
    min-height: 580px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Köşe Teknik Süslemeleri (Brutalist Teknik Derinlik) */
.app-container::before, .app-container::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--text-muted);
}
.app-container::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.app-container::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* Ekran Yapısı (SPA Görünümleri) */
.view {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view.active {
    display: flex;
}

/* Başlık Grubu */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- GİRİŞ GÖRÜNÜMÜ (PIN PAD) --- */

/* PIN Ekranı Göstergesi */
.pin-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.personel-select {
    width: 100%;
    max-width: 280px;
    height: 48px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-align-last: center;
    padding: 0 16px;
    outline: none;
    cursor: pointer;
    margin-bottom: 8px;
    border-radius: var(--radius-sharp);
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238e8e9f' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.personel-select:focus {
    border-color: var(--border-active);
}

.pin-dots {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    transition: all 0.15s ease;
}

.pin-dot.filled {
    background-color: var(--border-active);
    border-color: var(--border-active);
    box-shadow: 0 0 10px rgba(255, 122, 0, 0.4);
}

.error-message {
    color: var(--color-warning);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    height: 20px;
    text-align: center;
    text-transform: uppercase;
}

/* PIN Tuş Takımı */
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.pin-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    height: 60px; /* Rahat dokunmatik hedef (Touch target >= 48px) */
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s ease;
}

.pin-btn:hover {
    border-color: var(--text-secondary);
}

.pin-btn:active {
    background-color: var(--border-color);
    transform: scale(0.96);
}

.pin-btn.action-btn {
    font-size: 0.95rem;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.pin-btn.clear-btn {
    color: var(--text-secondary);
}

/* --- AKSİYON GÖRÜNÜMÜ (BUTONLAR) --- */

.welcome-info {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
}

.welcome-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.welcome-info .status-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Giriş/Çıkış Butonları Konteyneri */
.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Devasa Touch-Friendly Butonlar */
.main-action-btn {
    height: 90px; /* Depo personeli için süper kolay dokunma */
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-action-btn .btn-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-action-btn .btn-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Buton Durumları */
.main-action-btn.cikis:hover {
    border-color: var(--color-warning);
    box-shadow: 0 0 15px rgba(255, 61, 0, 0.15);
}
.main-action-btn.cikis:active {
    background-color: rgba(255, 61, 0, 0.1);
    transform: translateY(2px);
}

.main-action-btn.donus:hover {
    border-color: var(--color-success);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.15);
}
.main-action-btn.donus:active {
    background-color: rgba(0, 230, 118, 0.1);
    transform: translateY(2px);
}

/* Çıkış Yapma Butonu */
.logout-btn-container {
    text-align: center;
    margin-top: auto;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    transition: all 0.1s ease;
}

.secondary-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.secondary-btn:active {
    background-color: var(--bg-input);
}

/* --- CAPTCHA MODAL / EKRANI --- */
.captcha-container {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    display: none;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.2s ease forwards;
}

.captcha-container.active {
    display: flex;
}

.captcha-question {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.captcha-input-wrapper {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 240px;
}

.captcha-input {
    flex-grow: 1;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    text-align: center;
    height: 48px;
    outline: none;
}

.captcha-input:focus {
    border-color: var(--border-active);
}

.captcha-submit-btn {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    padding: 0 16px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.1s ease;
}

.captcha-submit-btn:hover {
    background-color: var(--color-success);
}

/* --- ADMİN PANELİ --- */
.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 16px;
}

.admin-controls h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: center;
}

.date-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.date-input {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    height: 40px;
    padding: 0 10px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}

.date-input:focus {
    border-color: var(--border-active);
}

/* --- ALT BİLGİ VE DURUM ÇUBUĞU (FOOTER & STATUS) --- */
.footer-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-success);
}

.status-dot.offline {
    background-color: var(--color-warning);
    box-shadow: 0 0 6px var(--color-warning);
}

.sync-badge {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    font-size: 0.65rem;
    color: var(--color-sync);
    display: none;
}

.sync-badge.active {
    display: inline-block;
    animation: pulse 1s infinite alternate;
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    from { opacity: 0.6; }
    to { opacity: 1; }
}
