﻿:root {
    --red: #f73535;
    --dark: #434343;
    --white: #ffffff
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
    overflow: hidden;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    background: #f6f6f6;
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: stretch
}

.wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    background: var(--white);
    border-radius: 0;
    overflow: hidden
}

.left {
    flex: 0 0 30%;
    padding: 48px 36px 40px;
    background: linear-gradient(180deg, #fff, #f9f9f9);
    align-content: center;
}

.right {
    flex: 0 0 70%;
    position: relative;
    min-height: 420px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat
}

.right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.06));
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    padding-left: 0;
}

.brand-logo {
    max-width: 50%;
    height: auto;
    border-radius: 3px;
}

.pretitle {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: var(--dark)
}

p.sub {
    margin: 6px 0 12px;
    color: #6b6b6b;
    font-size: 13px;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px
}

label {
    font-size: 12px;
    color: #666
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 3px;
    border: 1px solid #e9e9e9;
    background: #fafafa;
    transition: box-shadow .12s, transform .12s;
    outline: none
}

input:focus {
    box-shadow: 0 6px 18px rgba(67, 67, 67, 0.06);
    transform: translateY(-1px);
    border-color: rgba(67, 67, 67, 0.08)
}

.actions {
    display: flex;
    align-items: center;
    margin-top: 6px
}

button {
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 9px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    transition: transform .12s, box-shadow .12s;
    width: 100%;
}

button:hover {
    transform: translateY(-1px);
}

.error {
    background: #fff0f0;
    border: 1px solid rgba(226, 59, 59, 0.12);
    color: var(--red);
    padding: 10px;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 6px
}

.muted {
    font-size: 12px;
    color: #999
}

.footer {
    margin-top: 16px;
    text-align: center;
    color: #9a9a9a;
    font-size: 12px
}

.right .credit {
    position: absolute;
    left: 16px;
    bottom: 12px;
    color: #fff;
    font-size: 12px;
    z-index: 2
}

@media (max-width:900px) {
    .wrapper { flex-direction: column }

    .left {
        flex: 0 0 auto;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .brand { margin-bottom: 28px; }

    .right {
        flex: 0 0 auto;
        min-height: 200px;
        background-position: center;
    }

    form { width: 100%; max-width: 420px; }
}
    @media (max-width:900px) {
        .wrapper { flex-direction: column; min-height: 100vh; }

        .right {
            position: fixed;
            inset: 0;
            z-index: 0;
            background-position: center;
            background-size: cover;
        }

        .left {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 1;
            width: min(92%, 420px);
            padding: 22px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.96);
            box-shadow: 0 10px 30px rgba(0,0,0,0.12);
            display: flex;
            flex-direction: column;
            gap: 8px;
            text-align: left;
        }

        .brand { margin-bottom: 18px; display:flex; justify-content:center }
        .brand-logo { max-width: 48%; height: auto }
        form { width: 100%; }

        body, html { height: 100%; }
    }

@media (max-width:600px) {
    .left { padding: 18px; }
    p.sub { font-size: 13px; }

    label { font-size: 13px; }
    input[type="text"],
    input[type="password"] {
        padding: 12px 14px;
        font-size: 15px;
    }

    button {
        padding: 12px;
        font-size: 15px;
        min-height: 44px;
    }

    .actions { margin-top: 10px }
}

@media (max-width:420px) {
    .left { padding: 14px; gap: 8px }
    .brand { margin-bottom: 18px }

    .error { font-size: 13px; padding: 8px }
    .footer { font-size: 12px }

    form { padding: 0 6px }

    .right { min-height: 140px; background-position: center; background-size: cover }
    .right .credit { display: none }
}

input[type="text"], input[type="password"], button {
    -webkit-tap-highlight-color: transparent;
}

button:active { transform: translateY(0) }

button, .ev-btn-icon { min-height: 44px; min-width: 44px }


*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d0d0d0, #a8a8a8);
    border-radius: 8px;
    border: 2px solid #f1f1f1;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #bdbdbd, #979797);
}

html {
    scrollbar-width: thin;
    scrollbar-color: #a8a8a8 #f1f1f1;
}

.upcoming-list,
.machine-grid,
.machines-panel,
.logger-panel {
    overflow: auto;
}

.logger-panel {
    background: #ffffff;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 6px;
    height: 100%;
}

.logger-filters select,
.logger-filters input[type="date"],
.logger-filters input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #e9e9e9;
    border-radius: 4px;
    background: #fafafa;
    font-size: 13px;
}

.logger-filters .btn {
    padding: 8px 12px;
    background: var(--red);
    color: #fff;
    border-radius: 4px;
    border: none;
}

#loggerTable {
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

#loggerTable thead th {
    background: #fafafa;
    padding: 10px;
    text-align: left;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

#loggerTable tbody td {
    border-bottom: 1px solid #fbfbfb;
    padding: 8px 10px;
    font-size: 13px;
    vertical-align: top;
}

#loggerTable tbody tr:hover {
    background: #fcfcfc;
}

.logger-empty {
    color: #666;
    padding: 12px;
}

.upcoming-list {
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 6px;
}

.upcoming-table thead th {
    background: #fafafa;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.upcoming-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #fbfbfb;
}

.ev-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.ev-btn-icon svg {
    width: 18px;
    height: 18px;
}

.ev-btn-icon--confirm {
    background: rgba(96, 179, 105, 0.08);
}

.ev-btn-icon--confirm svg {
    color: #5cb85c;
    fill: #5cb85c;
}

.ev-btn-icon--inprogress {
    background: rgba(59, 130, 246, 0.06);
}

.ev-btn-icon--inprogress svg {
    color: #3b82f6;
    fill: #3b82f6;
}

.logger-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #eee;
}

.logger-thumb:focus {
    outline: 2px solid rgba(59, 130, 246, 0.2);
}

.status-badge {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff7e6;
    color: #a67c00;
    border: 1px solid #ffedbf;
}

.status-in_progress {
    background: #e8f0ff;
    color: #1e60d0;
    border: 1px solid #d7e6ff;
}

.status-finished {
    background: #e9f7ee;
    color: #1a8f3a;
    border: 1px solid #cde9d2;
}

.reservations-panel {
    background: #ffffff;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 6px;
}

.reservations-panel thead th {
    background: #fafafa;
    padding: 10px;
    text-align: left;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

.reservations-panel tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #fbfbfb;
}