/* HULEC 홈 대시보드 — 모던 화이트 & 소프트 블루/인디고 */

.hora-dashboard {
    --dash-bg: #f8fafc;
    --dash-card: #ffffff;
    --dash-border: #e2e8f0;
    --dash-text: #0f172a;
    --dash-muted: #64748b;
    --dash-primary: #4f46e5;
    --dash-primary-soft: #eef2ff;
    --dash-danger: #ef4444;
    --dash-danger-soft: #fef2f2;
    background: var(--dash-bg);
    min-height: 100%;
    padding: 1.25rem 0 2rem;
}

.hora-dashboard__welcome {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 55%, #eef2ff 100%);
    border: 1px solid var(--dash-border);
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.hora-dashboard__welcome-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.hora-dashboard__welcome-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.hora-dashboard__welcome-title i {
    color: var(--dash-primary);
    margin-right: 0.5rem;
}

.hora-dashboard__welcome-sub {
    color: var(--dash-muted);
    margin: 0;
    font-size: 0.95rem;
}

.hora-dashboard__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--dash-muted);
}

.hora-dashboard__meta i {
    color: #94a3b8;
    margin-right: 0.35rem;
}

.hora-dashboard__live-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #334155;
}

.hora-dashboard__role-select-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    min-width: 11rem;
}

.hora-dashboard__role-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dash-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hora-dashboard__role-select {
    border: 1px solid var(--dash-border);
    border-radius: 0.5rem;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dash-text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hora-dashboard__role-select:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.hora-dashboard__role-select:disabled {
    opacity: 0.75;
    cursor: default;
    background-color: #f8fafc;
}

/* 빠른 링크 섹션 */
.hora-dashboard__section {
    background: var(--dash-card);
    border: 1px solid var(--dash-border);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.hora-dashboard__section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dash-border);
    background: #fafbfc;
}

.hora-dashboard__section-head-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
}

.hora-dashboard__edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 0.5rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.hora-dashboard__edit-btn:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.hora-dashboard__edit-btn i {
    font-size: 0.72rem;
}

/* 개인화 모달 */
.hora-dash-modal--personalize {
    max-width: 36rem;
}

.hora-personalize-search {
    position: relative;
    margin-bottom: 1rem;
}

.hora-personalize-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.hora-personalize-search input {
    width: 100%;
    border: 1px solid var(--dash-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 2.1rem;
    font-size: 0.875rem;
}

.hora-personalize-search input:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.hora-personalize-body {
    max-height: 22rem;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.hora-personalize-category {
    margin-bottom: 1rem;
}

.hora-personalize-category:last-child {
    margin-bottom: 0;
}

.hora-personalize-category__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f1f5f9;
}

.hora-personalize-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.35rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.12s;
}

.hora-personalize-item:hover {
    background: #f8fafc;
}

.hora-personalize-item input {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: #4f46e5;
}

.hora-personalize-item__text {
    min-width: 0;
}

.hora-personalize-item__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.hora-personalize-item__desc {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.1rem 0 0;
    line-height: 1.35;
}

.hora-personalize-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.hora-personalize-footer__right {
    display: flex;
    gap: 0.5rem;
}

.hora-dashboard__section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0;
}

.hora-dashboard__section-title i {
    color: var(--dash-primary);
    margin-right: 0.45rem;
}

.hora-dashboard__quick-search {
    position: relative;
    min-width: 14rem;
    flex: 1 1 14rem;
    max-width: 22rem;
}

.hora-dashboard__quick-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.hora-dashboard__quick-search input {
    width: 100%;
    border: 1px solid var(--dash-border);
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem 0.45rem 2.1rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hora-dashboard__quick-search input:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.hora-dashboard__links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.hora-dashboard__link-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--dash-border);
    border-radius: 0.75rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    width: 100%;
}

.hora-dashboard__link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    border-color: #c7d2fe;
}

.hora-dashboard__link-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.hora-dashboard__link-icon.accent-indigo { background: #eef2ff; color: #4f46e5; }
.hora-dashboard__link-icon.accent-blue { background: #eff6ff; color: #2563eb; }
.hora-dashboard__link-icon.accent-emerald { background: #ecfdf5; color: #059669; }
.hora-dashboard__link-icon.accent-violet { background: #f5f3ff; color: #7c3aed; }
.hora-dashboard__link-icon.accent-slate { background: #f1f5f9; color: #475569; }
.hora-dashboard__link-icon.accent-amber { background: #fffbeb; color: #d97706; }
.hora-dashboard__link-icon.accent-orange { background: #fff7ed; color: #ea580c; }
.hora-dashboard__link-icon.accent-rose { background: #fff1f2; color: #e11d48; }

.hora-dashboard__link-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dash-text);
    margin: 0 0 0.2rem;
    line-height: 1.35;
}

.hora-dashboard__link-desc {
    font-size: 0.78rem;
    color: var(--dash-muted);
    margin: 0;
    line-height: 1.4;
}

.hora-dashboard__empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--dash-muted);
}

.hora-dashboard__empty i {
    font-size: 2.25rem;
    color: #cbd5e1;
    margin-bottom: 0.75rem;
    display: block;
}

.hora-dashboard__empty-title {
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.35rem;
}

.hora-dashboard__stats--engineer {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    max-width: 640px;
}

.hora-dashboard__stats--web {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* 지점 통계 카드 */
.hora-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hora-dashboard__stat-card {
    background: var(--dash-card);
    border: 1px solid var(--dash-border);
    border-radius: 0.75rem;
    padding: 1.15rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hora-dashboard__stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.hora-dashboard__stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.35rem 0 0.15rem;
    line-height: 1.2;
}

.hora-dashboard__stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dash-text);
    margin: 0;
}

.hora-dashboard__stat-sub {
    font-size: 0.75rem;
    color: var(--dash-muted);
    margin: 0;
}

/* 시스템 정보 */
.hora-dashboard__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.hora-dashboard__info-card {
    background: var(--dash-card);
    border: 1px solid var(--dash-border);
    border-radius: 0.75rem;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hora-dashboard__info-card h6 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0 0 0.5rem;
}

.hora-dashboard__info-card h6 i {
    color: var(--dash-primary);
    margin-right: 0.4rem;
}

.hora-dashboard__info-card p,
.hora-dashboard__info-card ul {
    font-size: 0.8rem;
    color: var(--dash-muted);
    margin: 0;
}

.hora-dashboard__info-card ul {
    padding-left: 1.1rem;
}

/* ── 헤더 사용자 메뉴 ── */
.hora-header-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hora-header-user__trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.3rem 0.85rem 0.3rem 0.35rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hora-header-user__trigger:hover,
.hora-header-user__trigger.is-open {
    border-color: #c7d2fe;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.hora-header-user__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.hora-header-user__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hora-header-user__chevron {
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.2s;
}

.hora-header-user__trigger.is-open .hora-header-user__chevron {
    transform: rotate(180deg);
}

.hora-header-user__dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 15rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    padding: 0.5rem;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    transform-origin: top right;
}

.hora-header-user__dropdown.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.hora-header-user__dropdown-head {
    padding: 0.65rem 0.75rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.35rem;
}

.hora-header-user__dropdown-head strong {
    display: block;
    font-size: 0.875rem;
    color: #0f172a;
}

.hora-header-user__dropdown-head span {
    font-size: 0.75rem;
    color: #64748b;
}

.hora-header-user__menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    color: #334155;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.hora-header-user__menu-item:hover {
    background: #f8fafc;
}

.hora-header-user__menu-item i {
    width: 1.1rem;
    text-align: center;
    color: #64748b;
}

.hora-header-user__menu-item--danger {
    color: #dc2626;
}

.hora-header-user__menu-item--danger i {
    color: #ef4444;
}

.hora-header-user__menu-item--danger:hover {
    background: #fef2f2;
}

.hora-header-user__logout-form {
    margin: 0;
    padding: 0;
}

/* 모달 — 탭/우측패널(sor-panel z-index 1050) 위, 레이아웃 main 하단에 렌더 */
.hora-dash-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: hora-dash-fade-in 0.2s ease;
}

.hora-dash-modal {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    z-index: 1;
    animation: hora-dash-modal-in 0.25s ease;
}

.hora-dash-modal--sm {
    max-width: 22rem;
}

.hora-dash-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.hora-dash-modal__head h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.hora-dash-modal__close {
    border: none;
    background: #f1f5f9;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s;
}

.hora-dash-modal__close:hover {
    background: #e2e8f0;
    color: #334155;
}

.hora-dash-modal__body {
    padding: 1.25rem;
}

.hora-dash-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.hora-dash-profile-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.85rem;
}

.hora-dash-profile-row:last-child {
    border-bottom: none;
}

.hora-dash-profile-row span:first-child {
    color: #64748b;
    flex-shrink: 0;
}

.hora-dash-profile-row span:last-child {
    color: #0f172a;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.hora-dash-modal--corp {
    max-width: 24rem;
}

.hora-corp-select-form {
    width: 100%;
}

.hora-corp-select-label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.hora-corp-select-label__text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.hora-corp-select {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #0f172a;
    background-color: #fff;
    cursor: pointer;
}

.hora-corp-select:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* 토스트 */
.hora-dash-toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.hora-dash-toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #1e293b;
    color: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
    font-size: 0.875rem;
    animation: hora-dash-toast-in 0.3s ease;
    max-width: 22rem;
}

.hora-dash-toast--success i { color: #4ade80; }
.hora-dash-toast--error i { color: #f87171; }

@keyframes hora-dash-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hora-dash-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hora-dash-toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 640px) {
    .hora-dashboard__welcome {
        padding: 1.25rem;
    }

    .hora-dashboard__welcome-top {
        flex-direction: column;
    }

    .hora-dashboard__role-select-wrap {
        align-items: stretch;
        width: 100%;
    }

    .hora-header-user__name {
        display: none;
    }
}
