/* === reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0f172a; color: #e2e8f0; min-height: 100vh; }

/* === portal page === */
.portal-page { display: flex; align-items: center; justify-content: center; }
.portal-card {
    background: #1e293b; border-radius: 12px; padding: 40px 32px; width: 100%; max-width: 360px;
    text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.portal-card h1 { font-size: 1.25rem; font-weight: 500; margin-bottom: 24px; color: #94a3b8; }
.portal-card input {
    width: 100%; padding: 12px 16px; border-radius: 8px; border: 1px solid #334155;
    background: #0f172a; color: #e2e8f0; font-size: 1.5rem; text-align: center;
    letter-spacing: 0.5em; outline: none; transition: border-color 0.2s;
}
.portal-card input:focus { border-color: #3b82f6; }
.portal-card button {
    width: 100%; margin-top: 16px; padding: 12px; border-radius: 8px;
    border: none; background: #3b82f6; color: #fff; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
.portal-card button:hover { background: #2563eb; }
.portal-card .error { color: #f87171; margin-top: 12px; font-size: 0.875rem; }

/* === landing page === */
.landing-page header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; border-bottom: 1px solid #1e293b;
}
.landing-page .logo { font-size: 1.25rem; font-weight: 700; }
.landing-page .logout-btn { color: #94a3b8; text-decoration: none; font-size: 0.875rem; }
.landing-page .logout-btn:hover { color: #e2e8f0; }
.landing-page main { max-width: 720px; margin: 48px auto; padding: 0 24px; }
.landing-page h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 32px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card {
    display: block; background: #1e293b; border-radius: 12px; padding: 24px;
    text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s; border: 1px solid #334155;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); border-color: #3b82f6; }
.card-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 0.875rem; color: #94a3b8; }

/* === index (vitrina) === */
.index-page { display: flex; flex-direction: column; min-height: 100vh; }
.site-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 40px;
}
.site-header .logo { font-size: 1.5rem; font-weight: 700; color: #fff; cursor: default; user-select: none; letter-spacing: 0.02em; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: #fff; text-decoration: none; font-size: 0.95rem; opacity: 0.85; transition: opacity 0.2s; }
.site-nav a:hover { opacity: 1; }

.hero-video { position: relative; height: 100vh; width: 100%; overflow: hidden; }
.hero-video-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: rgba(7, 12, 24, 0.55);
}
.hero-content {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 24px;
}
.hero-content h1 {
    font-size: 3rem; font-weight: 700; line-height: 1.15;
    color: #fff; margin-bottom: 20px; max-width: 900px;
    text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.hero-content p {
    font-size: 1.2rem; color: rgba(255,255,255,0.85); max-width: 560px;
}

.site-footer { text-align: center; padding: 20px 24px; background: #0f172a; color: #64748b; font-size: 0.875rem; }

/* === responsive === */
@media (max-width: 640px) {
    .site-header { padding: 14px 20px; }
    .site-nav { gap: 18px; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
}
/* === вход по логину/паролю (вместо PIN) === */
.portal-card form input[type="text"],
.portal-card form input[type="password"] {
    font-size: 1rem; letter-spacing: normal; text-align: left; margin-top: 10px;
}
.portal-card form input:first-of-type { margin-top: 0; }
.portal-card .hint { color: #94a3b8; font-size: 0.85rem; margin: -12px 0 18px; line-height: 1.4; }
.portal-card .hint:last-child { margin: 18px 0 0; }
.portal-card a { color: #93c5fd; }
