/* ==================== 全局輕樣式主題 - 白天色系 ==================== */

/* 根變數 - 淺色調 */
:root {
    --light-bg: #f8fafc;
    --light-bg-secondary: #eef4f9;
    --light-card: #ffffff;
    --light-text: #1e293b;
    --light-text-muted: #475569;
    --light-border: #e2e8f0;
    --light-blue: #3b82f6;
    --light-blue-light: #dbeafe;
    --light-orange: #f59e0b;
    --light-orange-light: #fed7aa;
    --light-green: #10b981;
    --light-green-light: #d1fae5;
    --light-purple: #a855f7;
    --light-purple-light: #f3e8ff;
}

/* ==================== 頁面容器樣式 ==================== */

/* 主容器 */
.light-section {
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--light-bg-secondary) 100%);
    padding: 24px 0;
    border-radius: 12px;
    margin-bottom: 20px;
}

.light-container {
    padding: 0 16px;
}

/* ==================== 卡片樣式 ==================== */

.light-card {
    background: var(--light-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-border);
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.light-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.light-card-header {
    border-bottom: 2px solid var(--light-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.light-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light-text);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== 按鈕樣式 ==================== */

.light-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.light-btn-primary {
    background: var(--light-blue);
    color: white;
}

.light-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.light-btn-success {
    background: var(--light-green);
    color: white;
}

.light-btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.light-btn-warning {
    background: var(--light-orange);
    color: white;
}

.light-btn-warning:hover {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.light-btn-secondary {
    background: #e2e8f0;
    color: var(--light-text);
    border: 1px solid var(--light-border);
}

.light-btn-secondary:hover {
    background: #cbd5e1;
}

/* ==================== 表格樣式 ==================== */

.light-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.light-table thead {
    background: var(--light-bg);
    border-bottom: 2px solid var(--light-border);
}

.light-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--light-text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.light-table tbody tr {
    border-bottom: 1px solid var(--light-border);
    transition: background 0.3s ease;
}

.light-table tbody tr:hover {
    background: var(--light-bg);
}

.light-table tbody td {
    padding: 12px 16px;
    color: var(--light-text-muted);
}

/* ==================== 表單樣式 ==================== */

.light-form-group {
    margin-bottom: 20px;
}

.light-form-label {
    display: block;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.light-form-input,
.light-form-select,
.light-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    color: var(--light-text);
    transition: all 0.3s ease;
}

.light-form-input:focus,
.light-form-select:focus,
.light-form-textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================== 警告/成功消息樣式 ==================== */

.light-alert {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.light-alert-success {
    background: var(--light-green-light);
    border-left-color: var(--light-green);
    color: #065f46;
}

.light-alert-warning {
    background: var(--light-orange-light);
    border-left-color: var(--light-orange);
    color: #92400e;
}

.light-alert-error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #7f1d1d;
}

.light-alert-info {
    background: var(--light-blue-light);
    border-left-color: var(--light-blue);
    color: #1e40af;
}

/* ==================== 標籤和徽章 ==================== */

.light-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.light-badge-primary {
    background: var(--light-blue-light);
    color: #1e40af;
}

.light-badge-success {
    background: var(--light-green-light);
    color: #065f46;
}

.light-badge-warning {
    background: var(--light-orange-light);
    color: #92400e;
}

.light-badge-error {
    background: #fee2e2;
    color: #7f1d1d;
}

/* ==================== 網格佈局 ==================== */

.light-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.light-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.light-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==================== 響應式設計 ==================== */

@media (max-width: 1024px) {
    .light-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .light-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .light-section {
        padding: 16px 0;
    }

    .light-container {
        padding: 0 12px;
    }

    .light-card {
        padding: 16px;
        border-radius: 8px;
    }

    .light-card-title {
        font-size: 1rem;
    }

    .light-table thead th,
    .light-table tbody td {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .light-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .light-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .light-form-input,
    .light-form-select,
    .light-form-textarea {
        font-size: 16px; /* 防止移動設備上的自動縮放 */
    }
}

@media (max-width: 480px) {
    .light-card {
        padding: 12px;
    }

    .light-card-title {
        font-size: 0.95rem;
    }

    .light-btn {
        width: 100%;
    }
}

/* ==================== 動畫和過渡 ==================== */

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

.light-animate {
    animation: slideInUp 0.3s ease-out;
}

/* ==================== 分隔線 ==================== */

.light-divider {
    height: 1px;
    background: var(--light-border);
    margin: 20px 0;
}

/* ==================== 淺色文字和背景組合 ==================== */

.text-light-muted {
    color: var(--light-text-muted);
}

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

.bg-light-blue {
    background: var(--light-blue-light);
    color: #1e40af;
}

.bg-light-green {
    background: var(--light-green-light);
    color: #065f46;
}

.bg-light-orange {
    background: var(--light-orange-light);
    color: #92400e;
}

.bg-light-purple {
    background: var(--light-purple-light);
    color: #6b21a8;
}
