/* =======================================
   BuilderOffice - Bento Grid Portal CSS
   1등 시안: Vibrant Glassmorphism + Bento Grid
   ======================================= */

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #f0f4ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.97);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(203, 213, 225, 0.5);
    --border-color-hover: rgba(99, 102, 241, 0.4);
    --glass-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
    --glass-shadow-hover: 0 18px 40px rgba(99, 102, 241, 0.15);
    --glass-border: rgba(255, 255, 255, 0.6);
    --radius-tile: 24px;
    --radius-sm: 12px;
}

/* ===== Body & Background ===== */
body.vibrant-mode {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Pretendard', -apple-system, sans-serif;
}

body.vibrant-mode::before {
    display: none;
}

/* Animated Background Blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
    z-index: 0;
    pointer-events: none;
    animation: blobFloat 12s ease-in-out infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 520px;
    height: 520px;
    background: linear-gradient(to right, #ffecd2, #fcb69f);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 640px;
    height: 640px;
    background: linear-gradient(to right, #a1c4fd, #c2e9fb);
    animation-delay: -4s;
}

.blob-3 {
    top: 40%;
    left: 55%;
    width: 420px;
    height: 420px;
    background: linear-gradient(120deg, #e0c3fc, #8ec5fc);
    opacity: 0.12;
    animation-delay: -8s;
}

@keyframes blobFloat {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(30px, 20px) scale(1.05);
    }
}

/* ===== GNB ===== */
.top-gnb {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.gnb-left {
    display: flex;
    align-items: center;
    gap: 36px;
}

.gnb-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

.logo-icon {
    font-size: 1.6rem;
}

.gnb-menu {
    display: flex;
    gap: 4px;
}

.gnb-menu .nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.gnb-menu .nav-item:hover,
.gnb-menu .nav-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    padding: 6px 12px;
}

.header-search input {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    width: 160px;
}

.search-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== Main Layout ===== */
.main-content {
    margin-left: 0;
    margin-top: 62px;
    min-height: calc(100vh - 62px);
    padding: 28px 24px;
    position: relative;
    z-index: 1;
}

/* ===== Bento Portal ===== */
.bento-portal {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Row */
.bento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.bento-greeting h1 {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.bento-greeting h1 strong {
    color: #4f46e5;
}

.bento-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.bento-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bento-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.bento-action-btn:hover {
    border-color: #a5b4fc;
    transform: translateY(-2px);
}

.bento-action-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.bento-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* ===== BENTO GRID LAYOUT ===== */
.bento-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    /* Define areas:
       A B C D  (KPI row)
       E E F G  (content row 1)
       E E H H  (content row 2)
    */
    grid-template-areas:
        "a b c d"
        "e e f g"
        "e e h h";
}

/* ===== BENTO TILE BASE ===== */
.bento-tile {
    border-radius: var(--radius-tile);
    padding: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.bento-tile:hover {
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-3px);
}

/* Glass color variants */
.glass-white {
    background: var(--bg-card);
}

.glass-purple {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(139, 92, 246, 0.8));
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.glass-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(99, 179, 237, 0.8));
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.glass-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.85), rgba(251, 191, 36, 0.8));
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.glass-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(52, 211, 153, 0.8));
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

/* Grid area assignments */
.tile-a {
    grid-area: a;
}

.tile-b {
    grid-area: b;
}

.tile-c {
    grid-area: c;
}

.tile-d {
    grid-area: d;
}

.tile-e {
    grid-area: e;
    cursor: default;
}

.tile-f {
    grid-area: f;
    cursor: default;
}

.tile-g {
    grid-area: g;
    cursor: default;
}

.tile-h {
    grid-area: h;
    cursor: default;
}

/* ===== KPI TILE INNARDS ===== */
.tile-label {
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tile-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
}

.tile-unit {
    font-size: 1rem;
    font-weight: 600;
    margin-left: 4px;
    opacity: 0.8;
}

.tile-sub {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 6px;
}

.tile-icon-bg {
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: 3rem;
    opacity: 0.15;
    user-select: none;
    pointer-events: none;
}

/* ===== TILE HEADER (for data tiles) ===== */
.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tile-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tile-more {
    font-size: 0.8rem;
    color: #6366f1;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.15s;
}

.tile-more:hover {
    opacity: 0.7;
}

/* ===== BENTO TABLE (Activity) ===== */
.bento-table-wrap {
    overflow-y: auto;
    max-height: 280px;
}

.bento-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.bento-table thead tr {
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.95);
}

.bento-table thead th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bento-table tbody tr {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.04);
    transition: background 0.15s;
}

.bento-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.bento-table td {
    padding: 10px 10px;
    color: var(--text-secondary);
    vertical-align: middle;
}

.act-name {
    font-weight: 600;
    color: var(--text-primary);
}

.act-sub {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.act-val {
    font-weight: 700;
    color: #4f46e5;
    text-align: right;
}

.empty-cell {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-orange {
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

/* ===== MATERIAL LIST (tile-f) ===== */
.mat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mat-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.mat-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mat-stock {
    font-size: 0.78rem;
    font-weight: 700;
}

.mat-stock.ok {
    color: #10b981;
}

.mat-stock.warning {
    color: #f59e0b;
}

.mat-stock.danger {
    color: #ef4444;
}

.mat-bar-wrap {
    height: 6px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 99px;
    overflow: hidden;
}

.mat-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}

.mat-bar.ok {
    background: linear-gradient(to right, #10b981, #34d399);
}

.mat-bar.warning {
    background: linear-gradient(to right, #f59e0b, #fbbf24);
}

.mat-bar.danger {
    background: linear-gradient(to right, #ef4444, #f87171);
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 20px 0;
    font-size: 0.9rem;
}

/* ===== QUICK GRID (tile-g) ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 10px 6px;
    border-radius: 14px;
    transition: all 0.2s;
}

.quick-item:hover {
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.quick-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
}

/* ===== NOTICE LIST (tile-h) ===== */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s;
}

.notice-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.notice-badge {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    white-space: nowrap;
    margin-top: 1px;
}

.notice-badge.info {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.notice-title {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.notice-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.empty-notice-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px;
    border-top: 1px dashed var(--border-color);
    margin-top: 4px;
}

/* ===== STAT / CARD (for other pages compatibility) ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    gap: 14px;
    align-items: center;
    box-shadow: var(--glass-shadow);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.12);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.12);
}

.stat-icon.orange {
    background: rgba(249, 115, 22, 0.12);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* .card (other pages) */
.vibrant-mode .card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    border-radius: 18px;
}

.vibrant-mode .card-title {
    color: var(--text-primary);
}

.vibrant-mode tbody td {
    color: var(--text-secondary);
}

.vibrant-mode thead th {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "a b"
            "c d"
            "e e"
            "f g"
            "h h";
    }
}

@media (max-width: 700px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "a" "b" "c" "d"
            "e" "f" "g" "h";
    }

    .main-content {
        padding: 16px 12px;
    }

    .bento-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tile-value {
        font-size: 1.6rem;
    }

    .gnb-menu {
        display: none;
    }
}

/* =======================================
   공수표 (Gongsu Table) Styles
   ======================================= */
.gongsu-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}

.gongsu-month-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 180px;
    text-align: center;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.gongsu-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.gongsu-table {
    border-collapse: collapse;
    font-size: 0.78rem;
    min-width: 1200px;
    width: 100%;
}

.gongsu-table th,
.gongsu-table td {
    border: 1px solid rgba(203, 213, 225, 0.6);
    text-align: center;
    padding: 4px 2px;
    white-space: nowrap;
}

.gongsu-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.gongsu-hdr th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 6px 3px;
}

.gs-no {
    width: 32px;
    min-width: 32px;
    position: sticky;
    left: 0;
    z-index: 3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.gs-name {
    width: 70px;
    min-width: 70px;
    position: sticky;
    left: 32px;
    z-index: 3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    font-weight: 600;
}

tbody .gs-no {
    background: var(--bg-secondary) !important;
    font-weight: 500;
    color: var(--text-muted);
}

tbody .gs-name {
    background: var(--bg-secondary) !important;
    color: var(--text-primary);
    text-align: left;
    padding-left: 6px;
}

.gs-day {
    width: 36px;
    min-width: 36px;
}

.gs-day-num {
    font-weight: 700;
    font-size: 0.8rem;
}

.gs-dow {
    font-size: 0.65rem;
    opacity: 0.8;
}

.gs-sat {
    background-color: rgba(59, 130, 246, 0.08) !important;
    color: #3b82f6;
}

.gs-sun {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444;
}

.gongsu-hdr .gs-sat {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    color: #bfdbfe;
}

.gongsu-hdr .gs-sun {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important;
    color: #fecaca;
}

.gs-cell {
    cursor: pointer;
    transition: background 0.15s;
    height: 30px;
    font-weight: 500;
}

.gs-cell:hover {
    background-color: rgba(99, 102, 241, 0.12) !important;
}

.gs-filled {
    color: var(--text-primary);
    font-weight: 700;
}

.gs-total {
    background: rgba(16, 185, 129, 0.15) !important;
    font-weight: 700;
    min-width: 50px;
}

.gs-total-cell {
    font-weight: 700;
    color: #059669;
    background: rgba(16, 185, 129, 0.06);
}

.gongsu-footer td {
    background: rgba(99, 102, 241, 0.06);
    font-weight: 600;
    color: var(--text-secondary);
    border-top: 2px solid var(--border-color);
}

.gs-input {
    width: 34px;
    height: 26px;
    border: 2px solid #6366f1;
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: white;
    outline: none;
    padding: 0;
}

.gs-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* =======================================
   노무비 대장 (Payroll Table) Styles
   ======================================= */
.payroll-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.payroll-table {
    border-collapse: collapse;
    font-size: 0.72rem;
    min-width: 2000px;
    width: 100%;
}

.payroll-table th,
.payroll-table td {
    border: 1px solid rgba(203, 213, 225, 0.6);
    text-align: center;
    padding: 4px 3px;
    white-space: nowrap;
}

.payroll-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.payroll-hdr th {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5987 100%);
    color: white;
    font-weight: 600;
    padding: 6px 3px;
}

.payroll-hdr2 th {
    background: linear-gradient(135deg, #2d5987 0%, #3a6f9f 100%);
    color: #bfdbfe;
    font-weight: 500;
    font-size: 0.68rem;
    padding: 3px 2px;
}

.pr-fixed {
    position: sticky;
    left: 0;
    z-index: 3;
    background: white;
    font-weight: 500;
}

.payroll-hdr .pr-fixed,
.payroll-hdr2 .pr-fixed {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5987 100%) !important;
}

.pr-name {
    text-align: left;
    padding-left: 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.pr-rid {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.pr-day {
    width: 28px;
    min-width: 28px;
}

.pr-day-cell {
    font-weight: 500;
    height: 28px;
}

.pr-dow {
    font-size: 0.6rem;
}

.pr-num {
    font-weight: 600;
    white-space: nowrap;
    min-width: 70px;
}

.pr-gross {
    color: #1e40af;
    background: rgba(59, 130, 246, 0.06);
}

.pr-ded {
    color: #dc2626;
    font-size: 0.68rem;
    background: rgba(239, 68, 68, 0.03);
}

.pr-total-ded {
    color: #dc2626;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.06);
}

.pr-net {
    color: #059669 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    font-weight: 700 !important;
}

.pr-ins-header {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fecaca !important;
}

.pr-ins-sub {
    background: rgba(239, 68, 68, 0.1) !important;
    min-width: 65px;
}

.payroll-footer td {
    background: rgba(30, 58, 95, 0.06);
    font-weight: 700;
    border-top: 2px solid var(--border-color);
}

.payroll-info {
    padding: 12px 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: rgba(99, 102, 241, 0.03);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* =======================================
   Login Page
   ======================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-container {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 480px;
    padding: 40px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 8px;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.login-form-section {
    margin-bottom: 20px;
}

.login-input-group {
    margin-bottom: 14px;
}

.login-input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.login-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    background: var(--bg-card);
    padding: 0 16px;
    position: relative;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.login-role-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-role-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.login-role-card:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.login-role-icon {
    font-size: 1.8rem;
    width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.login-role-info {
    flex: 1;
}

.login-role-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.login-role-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.login-role-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* =======================================
   User Badge (GNB)
   ======================================= */
.user-badge {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* =======================================
   Site Cards
   ======================================= */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.site-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: 18px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.site-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.site-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.site-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.site-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.site-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.site-info-label {
    color: var(--text-muted);
    font-weight: 600;
}

.site-card-progress {
    margin-bottom: 12px;
}

.site-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.site-card-footer {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* =======================================
   Work Input Form Sections
   ======================================= */
.wi-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wi-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.wi-section:last-of-type {
    border-bottom: none;
}

.wi-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.wi-submit-area {
    display: flex;
    gap: 12px;
    padding: 20px 0;
}

.wi-safety-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.wi-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.wi-check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.wi-expense-row {
    margin-bottom: 8px;
}

.wi-photo-area {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wi-photo-placeholder {
    width: 100%;
    max-width: 200px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.wi-photo-placeholder:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.04);
}

.wi-photo-placeholder span {
    font-size: 1.5rem;
}

.wi-photo-placeholder p {
    font-size: 0.78rem;
    margin-top: 4px;
}

/* =======================================
   Safety Checklist
   ======================================= */
.safety-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.safety-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.safety-check-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.safety-check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #10b981;
    flex-shrink: 0;
}

.safety-detail-item {
    padding: 6px 0;
    font-size: 0.88rem;
}

.safety-detail-item.checked {
    color: var(--text-secondary);
}

.safety-detail-item.unchecked {
    color: #dc2626;
    font-weight: 600;
}

/* =======================================
   Approval Cards
   ======================================= */
.approval-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.approval-card {
    padding: 18px;
    border-radius: 16px;
    border: 1.5px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.approval-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.approval-pending {
    border-left: 4px solid #f59e0b;
}

.approval-approved {
    border-left: 4px solid #10b981;
}

.approval-rejected {
    border-left: 4px solid #ef4444;
}

.approval-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.approval-type {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.approval-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.approval-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.approval-detail {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-bottom: 12px;
}

.approval-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.approval-result {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 8px;
}

/* =======================================
   Mobile Bottom Navigation
   ======================================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
}

.mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 6px 8px;
    border-radius: 10px;
    transition: all 0.15s;
}

.mob-nav-item small {
    font-size: 0.65rem;
    font-weight: 600;
}

.mob-nav-item.active {
    color: #4f46e5;
}

.mobile-more-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mobile-more-content {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    padding-bottom: 80px;
}

.mobile-more-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-more-header button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.mobile-more-item {
    display: block;
    padding: 14px 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    transition: background 0.15s;
}

.mobile-more-item:hover {
    background: rgba(99, 102, 241, 0.06);
}

/* =======================================
   GNB overflow scroll on desktop
   ======================================= */
.gnb-menu {
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.gnb-menu::-webkit-scrollbar {
    display: none;
}

/* =======================================
   Mobile Responsive Override
   ======================================= */
@media (max-width: 700px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .main-content {
        padding-bottom: 80px;
    }

    .gnb-menu {
        display: none;
    }

    .gnb-right .header-search,
    .gnb-right .user-badge {
        display: none;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .wi-submit-area {
        flex-direction: column;
    }
}