/* =============================================
   GuestReception — custom styles (Bootstrap 5)
   ============================================= */

:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1e2a3a;
    --sidebar-text: #a8b8cc;
    --sidebar-active: #ffffff;
    --sidebar-hover: #2d3f55;
    --topbar-height: 60px;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
}

/* ---- Layout ---- */
body {
    background: #f1f5f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}

#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease;
}

/* ---- Sidebar brand ---- */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    color: #fff !important;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-icon {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #fff; flex-shrink: 0;
}
.sidebar-brand .brand-text small {
    display: block;
    font-size: .7rem;
    color: var(--sidebar-text);
    font-weight: 400;
}

/* ---- Sidebar nav ---- */
.sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex: 1;
}
.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .875rem;
    border-radius: 0;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.sidebar-nav li a i {
    width: 18px; text-align: center; font-size: .95rem; flex-shrink: 0;
}
.sidebar-nav li a:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-active);
}
.sidebar-nav li.active > a {
    background: rgba(59,130,246,.22);
    color: #fff;
    border-left: 3px solid var(--accent);
    font-weight: 600;
}
.sidebar-submenu li.active > a {
    background: rgba(59,130,246,.18);
    color: #fff;
    font-weight: 600;
    border-left: 3px solid var(--accent);
}
.sidebar-nav .nav-section {
    padding: 16px 20px 4px;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(168,184,204,.5);
    pointer-events: none;
}

/* dropdown in sidebar */
.sidebar-nav .has-submenu > a::after {
    content: '\f107';
    font-family: 'FontAwesome';
    margin-left: auto;
    font-size: .8rem;
    transition: transform .2s;
}
.sidebar-nav .has-submenu.open > a::after { transform: rotate(180deg); }
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,.15);
    display: none;
}
.sidebar-submenu.show { display: block; }
.sidebar-submenu li a {
    padding-left: 50px;
    font-size: .82rem;
}

/* ---- Topbar ---- */
#topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1030;
    flex-shrink: 0;
}
#topbar .sidebar-toggle-btn {
    background: none; border: none;
    color: #64748b; font-size: 1.1rem;
    padding: 6px 8px; cursor: pointer;
    border-radius: 6px;
    display: none;
}
#topbar .sidebar-toggle-btn:hover { background: #f1f5f9; }
#topbar .topbar-stats {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    flex: 1;
}
#topbar .topbar-stat {
    display: flex; align-items: center; gap: 5px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 20px; padding: 3px 10px;
    font-size: .78rem; font-weight: 500; color: #475569;
}
#topbar .topbar-stat i { font-size: .75rem; }
#topbar .topbar-right {
    display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.user-color-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: inline-block;
    flex-shrink: 0;
}

/* ---- Page content ---- */
.page-content {
    padding: 24px;
    flex: 1;
}

/* ---- Cards ---- */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    background: #fff;
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: .875rem;
    color: #1e293b;
    border-radius: 10px 10px 0 0 !important;
    padding: 14px 18px;
}
.card-body { padding: 18px; }

/* ---- Status steps ---- */
.status-steps {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.status-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-right: 1px solid #e2e8f0;
    text-decoration: none;
    color: #94a3b8;
    transition: background .15s;
}
.status-step:last-child { border-right: none; }
.status-step .step-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.status-step .step-label { font-size: .78rem; font-weight: 400; }
.status-step .step-title { font-size: .85rem; font-weight: 600; color: #64748b; }
.status-step.active {
    background: #f0fdf4;
    color: #166534;
}
.status-step.active .step-icon {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(34,197,94,.2);
}
.status-step.active .step-title { color: #16a34a; font-weight: 700; }
.status-step.active .step-label { color: #15803d; }
.status-step.migaj .step-icon { animation: pulse-green 1.2s infinite; }
@keyframes pulse-green {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

/* ---- Status action cards ---- */
.action-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; border-radius: 10px;
    text-decoration: none; color: #fff;
    font-weight: 600; font-size: .9rem;
    transition: filter .15s, transform .1s;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.action-card:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.action-card i { font-size: 1.8rem; opacity: .9; }
.action-card .ac-label { font-size: .7rem; font-weight: 400; opacity: .85; }
.action-card .ac-value { font-size: 1rem; font-weight: 700; }
.action-card-green  { background: linear-gradient(135deg,#22c55e,#16a34a); }
.action-card-blue   { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.action-card-yellow { background: linear-gradient(135deg,#f59e0b,#d97706); }
.action-card-red    { background: linear-gradient(135deg,#ef4444,#dc2626); }

/* ---- Login page ---- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e2a3a 0%, #2d3f55 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo {
    width: 60px; height: 60px;
    background: var(--accent);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #fff;
    margin: 0 auto 20px;
}
.login-title { font-size: 1.4rem; font-weight: 700; color: #1e293b; text-align: center; }
.login-subtitle { color: #64748b; text-align: center; font-size: .875rem; margin-bottom: 28px; }

/* ---- Tables ---- */
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 600; border-top: none; }
.table td { font-size: .875rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ---- Badges ---- */
.badge-icon {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .78rem; padding: .35em .6em;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }
    #sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.3);
    }
    #main-content { margin-left: 0; }
    #topbar .sidebar-toggle-btn { display: block; }
    .sidebar-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1039;
    }
    .sidebar-overlay.show { display: block; }
    .status-steps { flex-direction: column; }
    .status-step { border-right: none; border-bottom: 1px solid #e2e8f0; }
    .status-step:last-child { border-bottom: none; }
}
@media (max-width: 575.98px) {
    .page-content { padding: 14px; }
    #topbar { padding: 0 12px; gap: 8px; }
    #topbar .topbar-stats { display: none; }
}

/* ---- Misc ---- */
.komunikat-ok { display: none; }
.table-responsive { border-radius: 0 0 10px 10px; }
footer { font-size: .78rem; color: #94a3b8; padding: 16px 24px; border-top: 1px solid #e2e8f0; background: #fff; }
