* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #f5f6fa;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* HEADER */
.header {
    width: 100%;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 180px;
    height: 100px;
    object-fit: contain;
}

/* SIDEBAR */
.sidebar {
    width: 60px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    z-index: 998;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
}

.sidebar.expanded {
    width: 280px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 10px;
}

.sidebar.expanded .sidebar-header {
    justify-content: flex-end;
    padding: 0 18px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    padding: 8px 10px;
    flex-shrink: 0;
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #94a3b8;
    border-radius: 2px;
    transition: background 0.2s;
}

.hamburger:hover span {
    background: #f1f5f9;
}

.sidebar-content {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-content::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* NAV DIVIDER */
.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 16px;
}

/* NAV LINK */
.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.sidebar.expanded .nav-link {
    justify-content: flex-start;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 0 10px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

/* NAV ITEM */
.nav-item {
    margin-bottom: 2px;
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    white-space: nowrap;
    position: relative;
}

.sidebar.expanded .nav-toggle {
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 0 10px;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.nav-toggle-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.nav-label {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar.expanded .nav-label {
    display: inline;
    opacity: 1;
}

.nav-toggle .arrow {
    display: none;
    width: 7px;
    height: 7px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(-45deg);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar.expanded .nav-toggle .arrow {
    display: inline-block;
    margin-left: auto;
    margin-right: 2px;
}

.nav-toggle.open .arrow {
    transform: rotate(45deg);
}

.nav-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.nav-submenu.open {
    max-height: 200px;
}

.nav-submenu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.sidebar.expanded .nav-submenu li a {
    padding: 8px 12px 8px 48px;
    border-radius: 6px;
    margin: 1px 10px;
    justify-content: flex-start;
}

.nav-submenu li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.nav-submenu li a .nav-icon {
    width: 18px;
    height: 18px;
}

/* MAIN AREA */
.main-area {
    flex: 1;
    padding-left: 60px;
    margin-top: 70px;
    transition: padding-left 0.3s ease;
    min-height: calc(100vh - 70px);
}

.sidebar.expanded + .main-area,
.sidebar.expanded ~ .main-area {
    padding-left: 270px;
}

.content {
    padding: 30px;
}

/* LOADING OVERLAY */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text {
    font-size: 15px;
    font-weight: 500;
    color: #475569;
}

/* PROFILE DROPDOWN */
.profile-wrap {
    position: relative;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #4f46e5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    padding: 0;
}

.profile-avatar:hover {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-initial {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    display: none;
    z-index: 999;
    overflow: hidden;
}

.profile-menu.open {
    display: block;
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.profile-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-menu-avatar .profile-initial {
    font-size: 17px;
}

.profile-menu-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-menu-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-divider {
    height: 1px;
    background: #f1f5f9;
}

.profile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #dc2626;
    transition: background 0.15s;
    text-align: left;
}

.profile-menu-item:hover {
    background: #fef2f2;
}

.profile-menu-item svg {
    flex-shrink: 0;
}

/* UNIFIED MODAL SYSTEM */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 30000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 16px;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    0% { transform: scale(0.85) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes modalOut {
    0% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0.95) translateY(8px); opacity: 0; }
}

.modal-card.is-closing {
    animation: modalOut 0.18s ease forwards;
}

.modal-overlay.is-closing .modal-card:not(.response-modal) {
    animation: modalOut 0.18s ease forwards;
}

.response-modal {
    --response-accent: #4f46e5;
    max-width: 440px;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    animation: none;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.22, 1.08, 0.36, 1), opacity 0.24s ease;
    outline: none;
}

.response-modal:focus,
.response-modal:focus-visible {
    outline: none;
}

.response-overlay {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.response-overlay.show,
.response-overlay.is-closing {
    display: flex;
}

.response-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.response-overlay.show .response-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.response-overlay.is-closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.response-modal.is-closing {
    transform: translateY(14px) scale(0.97);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.18s ease;
}

.response-modal.is-success {
    --response-accent: #28b779;
}

.response-modal.is-error {
    --response-accent: #e85d6d;
}

.response-modal.is-warning {
    --response-accent: #f59e0b;
}

.response-modal.is-info {
    --response-accent: #4f46e5;
}

.response-modal-hero {
    min-height: 132px;
    background: var(--response-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 20px 18px;
}

.response-modal-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #fff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.response-modal-icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 2.6;
}

.response-modal-body {
    background: #fff;
    text-align: center;
    padding: 24px 28px 28px;
}

.response-modal-title {
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1;
    color: #2e4f7d;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.response-modal-msg {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #44566f;
    max-width: 320px;
    margin: 0 auto;
}

.response-modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.response-modal-actions[hidden] {
    display: none;
}

.response-modal-btn {
    min-width: 132px;
    border: none;
    border-radius: 999px;
    background: #f4ba08;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    padding: 10px 22px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.response-modal-btn:hover {
    background: #e5ac04;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(244, 186, 8, 0.25);
}

.response-modal-btn:focus-visible {
    outline: 3px solid rgba(244, 186, 8, 0.28);
    outline-offset: 2px;
}

.modal-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.modal-card-icon.success {
    background: #f0fdf4;
    color: #16a34a;
}

.modal-card-icon.error {
    background: #fef2f2;
    color: #dc2626;
}

.modal-card-icon.warning {
    background: #fffbeb;
    color: #d97706;
}

.modal-card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.modal-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.modal-card-msg {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0;
}

.modal-card-msg strong {
    color: #0f172a;
}

.modal-card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

.modal-card-btn {
    padding: 10px 32px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.modal-card-btn--primary {
    background: #4f46e5;
    color: #fff;
}

.modal-card-btn--primary:hover {
    background: #4338ca;
}

.modal-card-btn--danger {
    background: #ef4444;
    color: #fff;
}

.modal-card-btn--danger:hover {
    background: #dc2626;
}

.modal-card-btn--cancel {
    background: #f1f5f9;
    color: #475569;
}

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

@media (max-width: 640px) {
    .response-modal {
        max-width: 100%;
    }

    .response-modal-hero {
        min-height: 118px;
        padding: 20px 16px 16px;
    }

    .response-modal-icon {
        width: 76px;
        height: 76px;
    }

    .response-modal-icon svg {
        width: 32px;
        height: 32px;
    }

    .response-modal-body {
        padding: 20px 18px 24px;
    }

    .response-modal-title {
        font-size: 1.9rem;
    }

    .response-modal-msg {
        font-size: 0.9rem;
    }
}

.header-right--profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.table-col-photo {
    width: 50px;
}

.table-col-logo {
    width: 60px;
}

.table-col-actions-sm {
    width: 140px;
}

.table-col-actions-md {
    width: 180px;
}

.textarea-resize-vertical {
    resize: vertical;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-uppercase {
    text-transform: uppercase;
}

.field-spacing-top {
    margin-top: 12px;
}

.is-hidden {
    display: none !important;
}

.checkin-modal {
    max-width: 500px;
}

.image-modal {
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.image-modal__close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 32px;
}

.image-modal__img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
}
