:root {
    --gp-black: #1c1c1c;
    --gp-dark: #2f4050;
    --gp-yellow: #ffd800;
    --gp-yellow-dim: #d1b309;
    --gp-bg: #f5f5f5;
    --gp-text: #2f4050;
    --gp-red: #ed5565;
    --gp-green: #1ab394;
    --gp-ferie: #8e44ad;
    --gp-permesso: #4aa3df;
}

* { box-sizing: border-box; }

body.gp-time-app {
    margin: 0;
    background: var(--gp-bg);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--gp-text);
    padding-bottom: 80px;
}

.gp-time-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 14px 16px;
    background: var(--gp-black);
    color: #fff;
    border-bottom: 4px solid var(--gp-yellow);
}

.gp-time-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}
.gp-time-brand .gp-app-logo {
    height: 36px;
    width: auto;
    display: block;
}
.gp-time-header-side { min-width: 0; }
.gp-time-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.gp-time-actions a { color: var(--gp-yellow); font-size: 18px; }

.app-ciao {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin: 8px 0 20px;
    color: var(--gp-black);
}

.app-body { padding: 16px; max-width: 560px; margin: 0 auto; }

.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.card h3 { margin: 0 0 10px; font-size: 13px; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }

.card-ok {
    background: #fff8cc;
    color: var(--gp-black);
    font-weight: 600;
}
.card-avviso {
    text-decoration: none;
    color: inherit;
    display: block;
    border-left: 5px solid #ccc;
}
.card-avviso-ferie { border-left-color: var(--gp-ferie); background: #f7eefb; }
.card-avviso-permesso { border-left-color: var(--gp-permesso); background: #eef7fc; }
.card-avviso-attesa { border-left-color: var(--gp-yellow); background: #fff8cc; }
.card-avviso .avviso-tit { font-weight: 700; margin: 0 0 4px; color: var(--gp-black); }
.card-avviso .avviso-sub { font-size: 13px; color: #666; }

.status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}
.pill-in { background: var(--gp-green); color: #fff; }
.pill-out { background: var(--gp-red); }
.pill-ok { background: var(--gp-green); color: #fff; }
.pill-off { background: #aaa; }
.pill-wait { background: var(--gp-yellow); color: var(--gp-black); }
.pill-ferie { background: var(--gp-ferie); }
.pill-permesso { background: var(--gp-permesso); }

.stat-row {
    display: flex;
    gap: 10px;
}
.stat-row .card { flex: 1; text-align: center; }
.stat-row .num { font-size: 28px; font-weight: 200; }

.stream { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.stream:last-child { border-bottom: 0; }
.badge-in, .badge-out, .badge-doc {
    width: 28px; height: 28px; border-radius: 50%;
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.badge-in { background: var(--gp-green); color: #fff; }
.badge-out { background: var(--gp-red); }
.badge-doc { background: var(--gp-yellow); color: var(--gp-black); }

.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--gp-black);
    display: flex;
    border-top: 3px solid var(--gp-yellow);
}
.bottom-nav a {
    position: relative;
    flex: 1;
    text-align: center;
    color: #aaa;
    text-decoration: none;
    padding: 10px 4px 14px;
    font-size: 10px;
}
.bottom-nav a i { display: block; font-size: 16px; margin-bottom: 3px; }
.bottom-nav a.active { color: var(--gp-yellow); }
.nav-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    margin-left: 8px;
    background: #ed5565;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    line-height: 15px;
    border-radius: 8px;
    padding: 0 4px;
}
.stream-unread strong { font-weight: 700; }
.stream-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ed5565;
    flex-shrink: 0;
    margin-top: 8px;
}

.login-box {
    max-width: 360px;
    margin: 40px auto;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    border-top: 4px solid var(--gp-yellow);
}
.login-box input, .login-box button {
    width: 100%;
    padding: 14px;
    margin: 8px 0;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.login-box button,
.app-form .btn-go,
.btn-filter {
    background: var(--gp-yellow);
    color: var(--gp-black);
    border: 0;
    font-weight: 700;
    cursor: pointer;
}
.login-box button:active,
.app-form .btn-go:active,
.btn-filter:active {
    background: var(--gp-yellow-dim);
}
.hint { color: #888; font-size: 13px; text-align: center; }

.app-form label { display: block; font-size: 13px; color: #888; margin: 10px 0 4px; }
.app-form input, .app-form select, .app-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
}
.app-form .btn-go {
    width: 100%;
    padding: 14px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 16px;
}
.btn-filter {
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
}
.btn-cancel {
    background: transparent;
    color: var(--gp-red);
    border: 1px solid var(--gp-red);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
}
.stream-link {
    text-decoration: none;
    color: inherit;
    align-items: center;
}
.stream-link:active { background: #f8f8f8; }
