﻿:root {
    --bg: #0a0f1e;
    --surface: #ffffff;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    background-image: radial-gradient(ellipse at 15% 60%, rgba(14,165,233,0.12) 0%, transparent 55%), radial-gradient(ellipse at 85% 10%, rgba(99,102,241,0.10) 0%, transparent 55%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem;
}

/* ── CARD ── */
.app-card {
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── HEADER ── */
.app-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .app-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230ea5e9' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        pointer-events: none;
    }

.header-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-radius: 18px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(14,165,233,0.4);
}

    .header-logo i {
        font-size: 1.9rem;
        color: #fff;
    }

.app-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}

.app-header p {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* ── SECTIONS ── */
.section {
    display: none;
}

    .section.active {
        display: block;
        animation: fadeUp 0.4s ease both;
    }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── LANDING (Choose Section) ── */
.landing-body {
    padding: 2.5rem 2rem;
}

.landing-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.15rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.25s;
    text-align: left;
    margin-bottom: 0.85rem;
}

    .action-btn:hover {
        background: #fff;
        border-color: var(--primary);
        box-shadow: 0 4px 16px rgba(14,165,233,0.12);
        transform: translateY(-2px);
    }

    .action-btn:active {
        transform: translateY(0);
    }

    .action-btn .ab-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 1.35rem;
    }

        .action-btn .ab-icon.blue {
            background: linear-gradient(135deg, #dbeafe, #bfdbfe);
            color: #1d4ed8;
        }

        .action-btn .ab-icon.green {
            background: linear-gradient(135deg, #d1fae5, #a7f3d0);
            color: #059669;
        }

    .action-btn .ab-text strong {
        display: block;
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text);
    }

    .action-btn .ab-text span {
        font-size: 0.82rem;
        color: var(--muted);
    }

    .action-btn .ab-arrow {
        margin-left: auto;
        color: var(--muted);
        flex-shrink: 0;
    }

/* ── LOGIN SECTION ── */
.login-body {
    padding: 2rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .section-title i {
        color: var(--primary);
        font-size: 1.2rem;
    }

.field-group {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: var(--text);
    background: #f8fafc;
    transition: all 0.25s;
    width: 100%;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
    }

    .form-control.is-invalid {
        border-color: var(--danger);
    }

.input-icon-wrap {
    position: relative;
}

    .input-icon-wrap .form-control {
        padding-left: 2.5rem;
    }

    .input-icon-wrap .input-icon {
        position: absolute;
        left: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 1rem;
        pointer-events: none;
    }

    .input-icon-wrap .toggle-pw {
        position: absolute;
        right: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        cursor: pointer;
        font-size: 1rem;
        background: none;
        border: none;
        padding: 0;
    }

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(14,165,233,0.35);
    margin-top: 0.25rem;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(14,165,233,0.45);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.btn-text-back {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.875rem;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
}

    .btn-text-back:hover {
        color: var(--primary);
    }

/* ── DASHBOARD ── */
.dashboard-body {
    padding: 0;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.topbar-info {
    display: flex;
    flex-direction: column;
}

    .topbar-info .welcome {
        font-family: 'Outfit', sans-serif;
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
    }

    .topbar-info .company {
        font-size: 0.8rem;
        color: var(--muted);
    }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

    .btn-refresh:hover {
        background: #bae6fd;
    }

    .btn-refresh.spinning i {
        animation: spin 0.8s linear infinite;
    }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: #fee2e2;
    color: var(--danger);
    border: none;
    border-radius: 9px;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-logout:hover {
        background: #fecaca;
    }

/* Stats bar */
.stats-bar {
    display: flex;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    flex: 1;
    justify-content: center;
}

    .stat-chip.pending {
        background: #fef3c7;
        color: #92400e;
    }

    .stat-chip.total {
        background: #e0f2fe;
        color: #0c4a6e;
    }

/* Search bar */
.search-wrap {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.search-inner {
    position: relative;
}

    .search-inner .bi-search {
        position: absolute;
        left: 0.85rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 0.9rem;
        pointer-events: none;
    }

#searchInput {
    padding-left: 2.4rem;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #f8fafc;
    width: 100%;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: all 0.25s;
}

    #searchInput:focus {
        outline: none;
        border-color: var(--primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
    }

/* Visitor list */
#visitorList {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 120px;
}

.visitor-card {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: all 0.25s;
    animation: fadeUp 0.3s ease both;
}

    .visitor-card:hover {
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        border-color: #c7d2fe;
    }

.vc-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
}

.vc-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
    background: #f1f5f9;
}

.vc-info {
    flex: 1;
    min-width: 0;
}

.vc-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.3rem;
}

.vc-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.companion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.vc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .btn-view:hover {
        opacity: 0.9;
    }

.btn-close-meeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    background: #fee2e2;
    color: var(--danger);
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .btn-close-meeting:hover {
        background: #fecaca;
    }

    .btn-close-meeting:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.vc-time-bar {
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    font-size: 0.775rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Empty / Loading State */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}

    .empty-state i {
        font-size: 2.5rem;
        opacity: 0.35;
        display: block;
        margin-bottom: 0.75rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1rem;
    gap: 0.75rem;
    color: var(--muted);
}

    .loading-state .spinner-sm {
        width: 32px;
        height: 32px;
        border: 3px solid #e2e8f0;
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard footer */
.dashboard-footer {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
}

.auto-refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%,100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

/* ── MODAL ── */
.modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.modal-header-custom {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .modal-header-custom h5 {
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        font-size: 1.05rem;
        color: #fff;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .modal-header-custom .btn-close-modal {
        background: rgba(255,255,255,0.15);
        border: none;
        border-radius: 8px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        cursor: pointer;
        font-size: 0.85rem;
        transition: background 0.2s;
    }

        .modal-header-custom .btn-close-modal:hover {
            background: rgba(255,255,255,0.25);
        }

.modal-visitor-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid var(--border);
    background: #f1f5f9;
}

.modal-visitor-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
}

    .status-badge.pending {
        background: #fef3c7;
        color: #92400e;
    }

    .status-badge.approved {
        background: #d1fae5;
        color: #065f46;
    }

    .status-badge.close {
        background: #fee2e2;
        color: #991b1b;
    }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
}

.info-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}

    .info-block .ib-label {
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.2rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .info-block .ib-value {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text);
    }

.companions-section {
    padding: 0 1.5rem 1.25rem;
}

.companions-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.companion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

    .companion-item img {
        width: 46px;
        height: 46px;
        border-radius: 10px;
        object-fit: cover;
        border: 1px solid var(--border);
        background: #e2e8f0;
    }

    .companion-item .c-name {
        font-weight: 600;
        font-size: 0.88rem;
        color: var(--text);
    }

    .companion-item .c-num {
        font-size: 0.75rem;
        color: var(--muted);
    }

.no-companions {
    text-align: center;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed var(--border);
}

.modal-footer-custom {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-modal-close {
    padding: 0.55rem 1.25rem;
    background: #f1f5f9;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-modal-close:hover {
        background: #e2e8f0;
    }

/* ── TOAST ── */
.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 320px;
}

.vms-toast {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    animation: toastIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
    border-left: 4px solid var(--primary);
}

    .vms-toast.success {
        border-left-color: var(--success);
    }

    .vms-toast.error {
        border-left-color: var(--danger);
    }

    .vms-toast.warning {
        border-left-color: var(--warning);
    }

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(24px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

    .toast-icon.success {
        color: var(--success)
    }

    .toast-icon.error {
        color: var(--danger)
    }

    .toast-icon.warning {
        color: var(--warning)
    }

.toast-body-inner {
    flex: 1;
}

.toast-title {
    font-family: 'Outfit',sans-serif;
    font-weight: 700;
    font-size: 0.83rem;
    color: var(--text);
}

.toast-msg {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.875rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

/* ── MOBILE ── */
@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }

    .landing-body {
        padding: 1.75rem 1rem;
    }

    .login-body {
        padding: 1.5rem 1rem;
    }

    #visitorList {
        padding: 0.75rem 1rem;
    }

    .dashboard-topbar {
        padding: 1rem;
    }

    .stats-bar {
        padding: 0.75rem 1rem;
    }

    .search-wrap {
        padding: 0.75rem 1rem;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }
}

