/* style.css */

/* --- Design Tokens --- */
:root {
    --bg-dark: #0f111a;
    --bg-card: rgba(22, 28, 45, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 255, 255, 0.15);
    
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --primary-light: #818cf8;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', 'Noto Sans TC', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Background Glow Orbs --- */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
    top: -100px;
    left: -100px;
    animation: floatOrb 15s infinite alternate;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
    bottom: -150px;
    right: -100px;
    animation: floatOrb 20s infinite alternate-reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
    top: 30%;
    right: 20%;
    opacity: 0.2;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 80px) scale(1.1); }
}

/* --- Layout Container --- */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* --- Sidebar Style --- */
.sidebar {
    width: 280px;
    background: rgba(15, 17, 26, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon {
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.nav-btn i {
    font-size: 1.2rem;
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --- Admin Auth UI --- */
.admin-auth-block {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-glow);
}

.auth-status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-light);
    margin-top: 0.75rem;
    font-weight: 600;
    padding: 0 0.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- Main Content Area --- */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem;
    max-width: 1400px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #fff 60%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.realtime-clock {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

/* --- Page Sections --- */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Glassmorphism Cards --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* --- Clock Page --- */
.clock-card-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .clock-card-wrapper {
        grid-template-columns: 1fr;
    }
}

.clock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
}

.clock-display {
    margin-bottom: 2.5rem;
}

#clock-time {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

#clock-date {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.clock-form {
    width: 100%;
    max-width: 320px;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(15, 17, 26, 0.4);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-glow);
}

.clock-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.action-btn {
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.clock-in-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    box-shadow: 0 4px 15px var(--success-glow);
}

.clock-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.clock-out-btn {
    background: linear-gradient(135deg, var(--info), #0284c7);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.clock-out-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.quick-status {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Tables --- */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 1.15rem 1.25rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr {
    transition: var(--transition);
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem !important;
}

/* --- Action & Filter Bars --- */
.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    padding: 1.5rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
    flex: 1;
}

.filter-item label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.filter-item select,
.filter-item input {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(15, 17, 26, 0.5);
    color: #fff;
    font-family: var(--font-sans);
    outline: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-item select:focus,
.filter-item input:focus {
    border-color: var(--primary-light);
}

.btn-align {
    display: flex;
    flex-direction: row !important;
    gap: 0.75rem;
    min-width: unset;
    flex: 0 0 auto;
}

/* --- Buttons --- */
.primary-btn {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: var(--transition);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.danger-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
}

.danger-btn:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px var(--danger-glow);
}

.edit-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* --- Badges --- */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-primary {
    background-color: rgba(79, 70, 229, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background-color: rgba(14, 165, 233, 0.15);
    color: var(--info);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.code-span {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* --- Day Type Selector in Table --- */
.day-type-select {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.day-type-select:focus {
    border-color: var(--primary-light);
}

.day-type-select:disabled {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: default;
    appearance: none;
    -webkit-appearance: none;
    padding: 0.25rem 0;
}

/* --- Modals --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem;
    transform: translateY(30px);
    transition: var(--transition);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close-btn:hover {
    color: #fff;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(15, 17, 26, 0.6);
    color: #fff;
    font-family: var(--font-sans);
    outline: none;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-light);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* --- Toast Notification System --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.toast {
    background: rgba(22, 28, 45, 0.85);
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: var(--text-main);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    animation: toastIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

/* --- Salary Page Style --- */
.salary-dashboard {
    display: grid;
    grid-template-columns: 1.6fr 1.4fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .salary-dashboard {
        grid-template-columns: 1fr;
    }
}

.salary-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.salary-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.employee-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.employee-meta h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.salary-total-block {
    text-align: right;
}

.salary-total-block span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.salary-total-block h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--text-main), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.2));
}

.card-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.salary-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.stat-val {
    font-size: 1.15rem;
    font-weight: 700;
}

.text-highlight .stat-val {
    color: var(--primary-light);
}

.print-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.chart-card {
    height: 100%;
}

.chart-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.salary-composition {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.progress-label span:first-child {
    color: var(--text-muted);
}

.progress-label span:last-child {
    font-weight: 600;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 1s ease-out;
}

.fill-base { background: linear-gradient(90deg, var(--primary), #3b82f6); }
.fill-workday-ot { background: linear-gradient(90deg, var(--info), #06b6d4); }
.fill-restday-ot { background: linear-gradient(90deg, var(--warning), #f59e0b); }
.fill-holiday-ot { background: linear-gradient(90deg, var(--success), #34d399); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.compact-table th, 
.compact-table td {
    padding: 0.75rem 0.9rem !important;
    font-size: 0.85rem !important;
}

/* --- 【全新新增】排班行事曆 CSS 排版 --- */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-month-lbl {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    min-width: 130px;
    text-align: center;
}

.btn-icon-only {
    padding: 0.6rem 0.8rem !important;
    border-radius: 50% !important;
}

.calendar-outer-card {
    padding: 1.5rem !important;
}

.calendar-weeks-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.week-header-day {
    padding: 0.25rem;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(110px, auto);
    gap: 0.50rem;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: var(--transition);
    position: relative;
    min-height: 110px;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-glow);
}

.calendar-day.empty-day {
    background: transparent;
    border: none;
    pointer-events: none;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-day.weekend-day {
    background: rgba(255, 255, 255, 0.01);
}

/* 國定假日行事曆高亮 */
.calendar-day.holiday-day {
    background: rgba(239, 68, 68, 0.06) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

.calendar-day.holiday-day .day-number {
    color: var(--danger) !important;
    font-weight: 700;
}

.holiday-name-label {
    font-size: 0.7rem;
    color: var(--danger);
    font-weight: 700;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

/* 排班班別標籤樣式 */
.shift-tag-pill {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    text-align: center;
    display: block;
    margin-top: auto;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.shift-tag-pill.shift-night {
    background: linear-gradient(135deg, var(--warning), #ea580c);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.shift-tag-pill.shift-middle {
    background: linear-gradient(135deg, var(--info), #0891b2);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}

/* 畫筆面板樣式 */
.painter-palette {
    padding: 1.25rem !important;
    margin-bottom: 1.5rem;
}

.painter-palette h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-light);
}

.palette-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.palette-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.palette-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.palette-btn.active {
    background: var(--primary);
    border-color: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-glow);
}

.palette-btn.clear-palette.active {
    background: var(--danger);
    border-color: #f87171;
    box-shadow: 0 0 10px var(--danger-glow);
}

/* 班別彈窗與小表排版 */
.shifts-inline-form, .holiday-inline-form {
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.flex-1 {
    flex: 1;
}

.max-h-300 {
    max-height: 250px;
    overflow-y: auto;
}

/* --- Print Styles --- */
@media print {
    body * {
        visibility: hidden;
    }
    
    #salary-result-wrapper, 
    #salary-result-wrapper * {
        visibility: visible;
    }
    
    #salary-result-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: #000 !important;
        background: #fff !important;
        padding: 1.5cm !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .glass-card {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #333 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border-radius: 4px !important;
        margin-bottom: 1.5rem !important;
        page-break-inside: avoid;
    }
    
    .print-actions,
    .orb,
    .sidebar,
    .main-header,
    .filter-bar,
    .chart-card {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .custom-table {
        color: #000 !important;
        border-collapse: collapse !important;
        width: 100% !important;
    }
    
    .custom-table th {
        color: #000 !important;
        background-color: #f3f4f6 !important;
        border: 1px solid #333 !important;
        font-weight: bold !important;
        text-align: center !important;
    }
    
    .custom-table td {
        color: #000 !important;
        border: 1px solid #333 !important;
        background: #fff !important;
    }
    
    .salary-total-block h2 {
        -webkit-text-fill-color: #000 !important;
        color: #000 !important;
    }
    
    .badge {
        border: 1px solid #333 !important;
        color: #000 !important;
        background: transparent !important;
        border-radius: 4px !important;
    }
    
    .stat-box {
        border: 1px solid #333 !important;
        background: transparent !important;
        color: #000 !important;
    }
}

/* --- 【全新新增】LINE 登入與綁定樣式 --- */
.btn-line {
    background: linear-gradient(135deg, #06C755, #00B900);
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
    transition: var(--transition);
    text-decoration: none;
}

.btn-line:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(6, 199, 85, 0.4);
    filter: brightness(1.05);
}

.line-profile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(6, 199, 85, 0.08);
    border: 1px solid rgba(6, 199, 85, 0.25);
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    width: 100%;
    margin-bottom: 1.25rem;
}

.line-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #06C755;
    background: #2e354f;
    object-fit: cover;
}

.line-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.line-user-info strong {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}

.line-user-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.line-badge-bound {
    background: rgba(6, 199, 85, 0.15);
    color: #06C755;
    border: 1px solid rgba(6, 199, 85, 0.3);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

.line-logout-link {
    color: var(--danger);
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.line-logout-link:hover {
    text-decoration: underline;
}

.emp-list-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

