:root {
    --bg: #FFFFFF;
    --surface: #F7F9F4;
    --surface2: #EEF3E8;
    --border: #D4DCC8;
    --border-strong: #A8BF94;
    --green-primary: #3B6D11;
    --green-mid: #639922;
    --green-light: #C0DD97;
    --green-pale: #EAF3DE;
    --text-primary: #1A2410;
    --text-secondary: #4A5C3A;
    --text-muted: #7A8F6A;
    --mono: #2C2C2A;
    --danger: #8B2020;
    --danger-bg: #FAEAEA;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 0 16px;
    box-sizing: border-box;
    position: relative;
}

.brand { font-family: 'Literata', serif; font-weight: 600; }

h2 { font-size: 18px; font-weight: 500; margin: 28px 0 20px; }

input, select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 9px 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    margin-top: 4px;
}

input:focus {
    outline: 2px solid var(--green-mid);
    outline-offset: 2px;
}

button {
    border-radius: 8px;
    padding: 11px 20px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    border: 0.5px solid var(--border);
    transition: opacity 0.2s;
}

button:active { opacity: 0.8; }

.btn-primary {
    background: var(--green-primary);
    color: #fff;
    border: none;
    width: 100%;
}

.field { margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

.logo-block {
    text-align: center;
    padding: 40px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Pages */
.page { display: none; width: 100%; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Admin Dashboard */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    background: var(--surface2);
    padding: 4px;
    border-radius: 10px;
}

.tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border: none;
    background: none;
}

.tab.active {
    background: #fff;
    color: var(--green-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* List View */
.label-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

/* Utilities */
.badge-verified {
    display: inline-flex;
    align-items: center;
    background: var(--green-pale);
    color: var(--green-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0;
}

.hr { height: 1px; background: var(--border); margin: 16px 0; border: none; }

#loading-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.qr-box {
    background: #fff;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: inline-block;
    margin: 20px 0;
}
.qr-box canvas, .qr-box img { display: block; margin: 0 auto; }

#modal-wrap, #lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

#modal-inner {
    background: var(--bg);
    border-radius: 16px;
    padding: 24px;
    width: 85%;
    max-width: 320px;
    text-align: center;
}

#lightbox { background: rgba(0,0,0,0.9); align-items: flex-start; overflow-y: auto; padding: 40px 0; }
#lightbox img { width: 90%; max-width: 480px; border-radius: 12px; }

@media print {
    body * { visibility: hidden; }
    #print-area, #print-area * { visibility: visible; }
    #print-area { position: absolute; left: 0; top: 0; width: 60mm; }
}

/* Status Footer */
.status-footer {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    z-index: 1000;
}
#status-symbol {
    font-size: 8px;
    color: var(--danger);
    transition: color 0.3s;
}
#status-symbol.ok {
    color: var(--green-primary);
}
