@font-face {
    font-family: 'MBCorpoA';
    src: url('/fonts/corporate_a.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }
body { margin: 0; background: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }

.topbar { background: #000; border-bottom: 1px solid #1a1f29; height: 56px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.brand-wrap { display: flex; align-items: center; gap: 14px; }
.star-logo { width: 32px; height: 32px; }
.brand-title { font-family: 'MBCorpoA'; font-size: 20px; letter-spacing: 0.3px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.db-indicator { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9aa4b2; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.dot.ok { background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.6); }
.dot.err { background: #ef4444; }
.user-badge { font-size: 13px; color: #38bdf8; font-weight: 600; }

.btn-blue { background: #0078d4; color: #fff; border: none; border-radius: 2px; padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-blue:hover { background: #0086ed; }
.btn-outline { background: transparent; color: #fff; border: 1px solid #334155; border-radius: 2px; padding: 7px 18px; font-size: 13px; cursor: pointer; }
.btn-outline:hover { border-color: #0078d4; color: #38bdf8; }

.hero { background: radial-gradient(ellipse at 78% 45%, #083b66 0%, #031930 48%, #000 92%); border-bottom: 1px solid #141c28; padding: 42px 32px; }
.hero-inner { max-width: 1140px; margin: 0 auto; }
.hero-badge { font-size: 14px; font-weight: 700; letter-spacing: 1.5px; color: #38bdf8; margin-bottom: 12px; }
.hero h1 { font-family: 'MBCorpoA', Georgia, "Times New Roman", serif; font-weight: 400; font-size: 36px; line-height: 1.2; margin: 0 0 12px 0; }
.hero p { margin: 0; font-size: 14px; color: #cbd5e1; max-width: 640px; }

main { flex: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 32px 32px 56px; }
.section-title { font-size: 20px; font-weight: 400; margin: 0 0 20px 0; }

.alert-box { padding: 12px 16px; border-radius: 2px; margin-bottom: 20px; font-size: 14px; border: 1px solid #0078d4; background: rgba(0,120,212,0.15); color: #e2e8f0; }
.guest-card { background: #0d1015; border: 1px solid #242a35; border-radius: 2px; padding: 28px; max-width: 580px; }
.guest-card p { margin: 0 0 20px 0; color: #cbd5e1; font-size: 14px; line-height: 1.5; }
.guest-actions { display: flex; gap: 12px; }

.modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.mod-card { background: #0d1015; border: 1px solid #242a35; border-radius: 2px; padding: 22px; transition: border-color 0.15s, background 0.15s; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; }
.mod-card:hover { border-color: #0078d4; background: #121720; }
.mod-code { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #38bdf8; margin-bottom: 8px; }
.mod-name { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.mod-descr { font-size: 13px; color: #9aa4b2; line-height: 1.45; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.78); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #0d1015; border: 1px solid #242a35; border-radius: 2px; width: 100%; max-width: 400px; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; margin-bottom: 18px; }
.modal-close { background: none; border: none; color: #9aa4b2; font-size: 22px; cursor: pointer; }
.modal-err { background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; border-radius: 2px; }

form label { display: block; font-size: 12px; color: #9aa4b2; margin-bottom: 6px; margin-top: 12px; }
form input, form select { width: 100%; background: #06080b; border: 1px solid #242a35; border-radius: 2px; color: #fff; padding: 10px 12px; font-size: 14px; outline: none; }
form input:focus, form select:focus { border-color: #0078d4; }
.modal-foot { margin-top: 20px; }
.switch-link { margin-top: 14px; text-align: center; font-size: 13px; color: #9aa4b2; }
.switch-link a { color: #38bdf8; text-decoration: none; }

footer { border-top: 1px solid #1a1f29; padding: 18px 32px; font-size: 12px; color: #9aa4b2; display: flex; justify-content: space-between; }

.mod-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid #1a1f29; padding-bottom: 14px; }
.tabs-bar { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid #1a1f29; }
.tab-btn { background: transparent; border: none; border-bottom: 2px solid transparent; color: #9aa4b2; padding: 10px 18px; font-size: 14px; cursor: pointer; }
.tab-btn.active { color: #fff; border-bottom-color: #0078d4; font-weight: 600; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { background: #06080b; border: 1px solid #242a35; color: #fff; padding: 8px 12px; font-size: 13px; border-radius: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid #242a35; background: #0d1015; }
table.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-tbl th { text-align: left; padding: 10px 12px; background: #121720; color: #9aa4b2; font-weight: 600; border-bottom: 1px solid #242a35; white-space: nowrap; }
table.data-tbl td { padding: 9px 12px; border-bottom: 1px solid #1a1f29; color: #e2e8f0; vertical-align: middle; }
table.data-tbl tr:hover td { background: #131923; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 11px; font-weight: 600; }
.badge.ok { background: rgba(16,185,129,0.18); color: #34d399; }
.badge.warn { background: rgba(245,158,11,0.18); color: #fbbf24; }
.badge.err { background: rgba(239,68,68,0.18); color: #fca5a5; }
.btn-sm { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; padding: 4px 10px; font-size: 12px; border-radius: 2px; cursor: pointer; margin-right: 4px; }
.btn-sm:hover { border-color: #0078d4; color: #38bdf8; }
.btn-sm.danger:hover { border-color: #ef4444; color: #fca5a5; }
.modal-box.wide { max-width: 760px; max-height: 90vh; overflow-y: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note-item { background: #06080b; border: 1px solid #1f2633; padding: 8px 10px; margin-bottom: 6px; font-size: 12px; }
.note-date { color: #64748b; font-size: 11px; }
