* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
    color: #333;
}
body::before {
    content: '';
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 300px;
    background-image: url('/static/logo-small.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
    z-index: -1;
}
nav {
    background: #2c3e50;
    padding: 1rem;
    display: flex;
}
nav a {
    color: white;
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 500;
}
nav a:hover {
    text-decoration: underline;
}
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}
h1, h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem;
}
label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
}
input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="tel"],
input[type="password"],
select,
textarea {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
}
.error {
    color: #c0392b;
    background: #fadbd8;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
textarea {
    min-height: 80px;
    resize: vertical;
}
button, .btn {
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}
button:hover, .btn:hover {
    background: #2980b9;
}
.btn-danger {
    background: #e74c3c;
}
.btn-danger:hover {
    background: #c0392b;
}
.btn-success {
    background: #27ae60;
}
.btn-success:hover {
    background: #219a52;
}
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem -0.5rem;
    padding: 0 0.5rem;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}
th, td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}
th {
    background: #f8f9fa;
    font-weight: 600;
}
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    .card {
        padding: 1rem;
    }
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.2rem;
    }
    th, td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }
    .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    nav {
        padding: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    nav a {
        margin-right: 1rem;
        font-size: 0.9rem;
    }
}
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    height: 100%;
}
.status-finished {
    background: #279423ff;
    color: #fff3cd;
}
.status-active {
    background: #044b85ff;
    color: #fff3cd;
}
.status-warning {
    background: #856404;
    color: #fff3cd;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.qr-code {
    text-align: center;
    padding: 1rem;
}
.qr-code img {
    max-width: 200px;
}

/* Long-press button styles */
.long-press-btn {
    position: relative;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.long-press-btn .btn-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.3);
}
.long-press-btn.pressing .btn-progress {
    width: 100%;
    transition: width 1s linear;
}
.long-press-btn .btn-text {
    position: relative;
    z-index: 1;
}
.hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}
