:root {
    --primary-blue: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --primary-bg: #EFF6FF;
    --accent-yellow: #FACC15;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --success: #10B981;
    --danger: #EF4444;
    --nav-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.nav-item.active {
    color: var(--brand-color);
}
body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.5;
    padding-bottom: var(--nav-height);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}


a {
    text-decoration: none;
    color: #666;
}

    a:hover {
        color: #333;
        text-decoration: none;
    }

    a:link {
        text-decoration: none;
        color: #333;
    }

    a:active {
        text-decoration: none;
        color: #333;
    }

    a, a:hover, a:active, a:visited, a:link, a:focus {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-tap-highlight-color: transparent;
        outline: none;
        background: none;
        text-decoration: none;
    }

.clear {
    clear: both;
}

.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: "";
    clear: both;
    height: 0;
}
/* Background Wave Effect */
.bg-wave {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header & Navigation --- */
.main-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.brand-logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

/* View Toggles */
.view-toggles {
    display: flex;
    gap: 4px;
    background: #F1F5F9;
    padding: 4px;
    border-radius: 12px;
}

.toggle-btn {
    border: none;
    background: none;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #FFFFFF;
    color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Job Container --- */
.content-area {
    padding: 20px;
    flex: 1;
}

/* Grid View Styles */
.job-container.grid-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.job-container.grid-view .job-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.job-container.grid-view .job-card:active {
    transform: scale(0.98);
}

.job-container.grid-view .card-image {
    width: 100%;
    object-fit: cover;
    background-color: #CBD5E1;
}

.job-container.grid-view .card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.job-container.grid-view .job-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-container.grid-view .job-location {
    font-size: 11px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.job-container.grid-view .job-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.job-container.grid-view .status-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    background: #EFF6FF;
    color: var(--primary-blue);
}

/* List View Styles */
.job-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-container.list-view .job-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    position: relative;
    border-left: 4px solid transparent;
}

.job-container.list-view .job-card.active-status {
    border-left-color: var(--primary-blue);
}
    .job-container.list-view .job-card.active-status2 {
        border-left-color: green;
    }


.job-container.list-view .card-image {
    display: none; /* Hide image in list view */
}

/* Date box in list view */
.list-date-box {
    display: none;
}
.job-container.list-view .list-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding-right: 12px;
    border-right: 1px solid var(--border-color);
}
.list-date-day { font-size: 12px; color: var(--text-gray); }
.list-date-num { font-size: 18px; font-weight: 700; color: var(--text-dark); }

.job-container.list-view .card-content {
    flex: 1;
}

.job-container.list-view .job-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.job-container.list-view .job-location {
    font-size: 12px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-container.list-view .status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}
.status-icon.done { color: var(--success); background: #ECFDF5; }
.status-icon.pending { color: var(--accent-yellow); background: #FFFBEB; }

/* --- Calendar & Forms (for my_jobs.html) --- */
.calendar-wrapper {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.calendar-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.month-title {
    font-size: 18px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 12px;
    column-gap: 8px;
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    position: relative;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.cal-cell.header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    cursor: default;
    aspect-ratio: auto;
    padding-bottom: 8px;
}

.cal-cell .day-num {
    font-weight: 600;
    z-index: 2;
}

.cal-cell .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 4px;
}

/* States */
.cal-cell.available {
    background: #EFF6FF;
    color: var(--primary-blue);
    border-color: #DBEAFE;
}
.cal-cell.available:hover {
    background: var(--primary-blue);
    color: white;
}

.cal-cell.full {
    background: #F8FAFC;
    color: var(--text-light);
    cursor: not-allowed;
}
.cal-cell.full::after {
    content: '×';
    position: absolute;
    font-size: 20px;
    font-weight: 300;
    color: var(--text-light);
}

.cal-cell.selected {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 28px; /* Safe area padding */
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    gap: 4px;
    transition: color 0.2s;
    width: 60px;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

.nav-item.active {
    color: var(--primary-blue);
}

.nav-item.active svg {
    fill: rgba(59, 130, 246, 0.1);
}

/* Bottom Sheet */
.sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.sheet-backdrop.active .sheet-content {
    transform: translateY(0);
}

/* Form Elements */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: transform 0.1s;
}
.btn-primary:active {
    transform: scale(0.98);
}

@media (min-width: 640px) {
    .app-container {
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        background: white;
        min-height: 100vh;
    }
    .bottom-nav {
        position: absolute;
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- Legacy / Mypage Styles --- */

.profile-header {
    padding: 24px 20px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.avatar-placeholder {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.profile-id {
    font-size: 14px;
    color: var(--text-gray);
    font-family: monospace;
    background: rgba(0,0,0,0.03);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

.qr-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.qr-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.menu-group {
    margin-bottom: 24px;
}

.group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 12px;
    padding-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-list {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid var(--bg-color);
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #F9FAFB;
}

.menu-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.menu-icon-wrapper.blue { background: #EFF6FF; color: #3B82F6; }
.menu-icon-wrapper.indigo { background: #EEF2FF; color: #6366F1; }
.menu-icon-wrapper.purple { background: #F3E8FF; color: #A855F7; }
.menu-icon-wrapper.green { background: #ECFDF5; color: #10B981; }
.menu-icon-wrapper.gray { background: #F3F4F6; color: #6B7280; }
.menu-icon-wrapper.red { background: #FEF2F2; color: #EF4444; }

.menu-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.menu-value {
    font-size: 14px;
    color: var(--text-gray);
}

.status-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.status-badge.error {
    background: #FEF2F2;
    color: #EF4444;
}

.audit-alert {
    margin: 0 16px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.audit-alert svg {
    color: #EF4444;
    flex-shrink: 0;
    margin-top: 2px;
}

.audit-alert-content {
    flex: 1;
}

.audit-title {
    font-weight: 600;
    color: #991B1B;
    margin-bottom: 4px;
    font-size: 14px;
}

.audit-desc {
    font-size: 13px;
    color: #B91C1C;
    margin-bottom: 12px;
    line-height: 1.4;
}

.audit-action {
    display: inline-block;
    background: var(--accent-yellow);
    color: #713F12;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.1s;
}

.audit-action:active {
    transform: scale(0.98);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nav-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon.blue { background: #EFF6FF; color: #3B82F6; }
.nav-icon.purple { background: #F3E8FF; color: #A855F7; }
.nav-icon.green { background: #ECFDF5; color: #10B981; }
.nav-icon.indigo { background: #EEF2FF; color: #6366F1; }

.nav-content {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.nav-subtitle {
    font-size: 12px;
    color: var(--text-gray);
}

.nav-tip {
    font-size: 10px;
    color: var(--primary-blue);
    margin-top: 4px;
    font-weight: 500;
}

.company-address {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    padding: 0 20px 20px;
}

/* Modal (Restored) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 340px;
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0 8px;
}

.qr-placeholder-large {
    background: #F9FAFB;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.qr-hint {
    color: var(--text-gray);
    font-size: 14px;
}

.user-mini-info {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--nav-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-mini-info .name {
    font-weight: 700;
    font-size: 16px;
}
.loading-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}

    .loading-box span {
        width: 8px;
        height: 8px;
        background: #3b82f6;
        border-radius: 50%;
        animation: loadingDot 1.4s infinite ease-in-out both;
    }

        .loading-box span:nth-child(1) {
            animation-delay: 0s;
        }

        .loading-box span:nth-child(2) {
            animation-delay: .2s;
        }

        .loading-box span:nth-child(3) {
            animation-delay: .4s;
        }

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: .3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}