/*
Theme Name: 一般社団法人はまみらい 社内管理システム
Theme URI: https://example.com/workflow-theme
Author: Your Name
Author URI: https://example.com
Description: 一般社団法人はまみらい 社内管理システム - 稟議・承認・タイムカード・回覧板・会員管理
Version: 2.0.0
Requires at least: 5.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: workflow-theme
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary-color: #5f6368;
    --success-color: #1e8e3e;
    --success-light: #e6f4ea;
    --warning-color: #f9ab00;
    --warning-light: #fef7e0;
    --danger-color: #d93025;
    --danger-light: #fce8e6;
    --info-color: #1967d2;
    --info-light: #e8f0fe;
    
    --bg-color: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dadce0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-lg: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-color);
}

img,
svg,
iframe {
    max-width: 100%;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.wf-app {
    display: flex;
    min-height: 100vh;
}

.wf-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.wf-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.wf-header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.wf-content {
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.wf-sidebar-logo {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wf-sidebar-logo-text {
    flex: 1;
}

.wf-sidebar-logo h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.wf-sidebar-logo span {
    font-size: 11px;
    color: var(--text-muted);
}

.wf-sidebar-close {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    margin: -4px -8px -4px 8px;
}

.wf-sidebar-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .wf-sidebar-close {
        display: flex;
    }
}

.wf-nav {
    padding: 8px 0;
}

.wf-nav-section {
    padding: 8px 16px 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wf-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.wf-nav-item:hover {
    background: var(--bg-color);
    text-decoration: none;
}

.wf-nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.wf-nav-item .dashicons {
    margin-right: 12px;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.wf-nav-badge {
    margin-left: auto;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.wf-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.wf-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wf-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.wf-card-body {
    padding: 20px;
}

.wf-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ==========================================================================
   Buttons - Modern UI/UX
   ========================================================================== */
.wf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.wf-btn:active {
    transform: scale(0.98);
}

.wf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wf-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wf-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.wf-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1.5px solid #e2e8f0;
}

.wf-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1f2937;
}

.wf-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wf-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.wf-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wf-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.wf-btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 1.5px solid #3b82f6;
}

.wf-btn-outline:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #2563eb;
    border-color: #2563eb;
}

.wf-btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.wf-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
}

.wf-btn-icon {
    padding: 10px;
    border-radius: 10px;
}

.wf-btn-icon.wf-btn-sm {
    padding: 7px;
    border-radius: 8px;
}

/* ==========================================================================
   Forms - Modern UI/UX
   ========================================================================== */
.wf-form-group {
    margin-bottom: 20px;
    position: relative;
}

.wf-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.wf-form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.wf-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wf-form-control::placeholder {
    color: #94a3b8;
}

.wf-form-control:hover {
    border-color: #cbd5e1;
}

.wf-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wf-form-control:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

textarea.wf-form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

select.wf-form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    cursor: pointer;
}

select.wf-form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%231a73e8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.wf-form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wf-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Input with icon */
.wf-input-icon-wrapper {
    position: relative;
}

.wf-input-icon-wrapper .wf-form-control {
    padding-left: 44px;
}

.wf-input-icon-wrapper .wf-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.wf-input-icon-wrapper:focus-within .wf-input-icon {
    color: var(--primary-color);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.wf-table {
    width: 100%;
    border-collapse: collapse;
}

.wf-table th,
.wf-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.wf-table th {
    background: var(--bg-color);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.wf-table-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.wf-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    gap: 4px;
}

.wf-status-draft {
    background: var(--bg-color);
    color: var(--text-secondary);
}

.wf-status-pending {
    background: var(--warning-light);
    color: #b06000;
}

.wf-status-in-progress {
    background: var(--info-light);
    color: var(--info-color);
}

.wf-status-approved {
    background: var(--success-light);
    color: var(--success-color);
}

.wf-status-rejected {
    background: var(--danger-light);
    color: var(--danger-color);
}

.wf-status-completed {
    background: var(--success-light);
    color: var(--success-color);
}

.wf-status-paid {
    background: var(--primary-light);
    color: var(--primary-color);
}

.wf-status-cancelled {
    background: var(--bg-color);
    color: var(--text-secondary);
}

/* ==========================================================================
   Expense Styles (精算)
   ========================================================================== */
.wf-expense-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 2px solid var(--border-color);
}

.wf-expense-total-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.wf-expense-total-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.wf-amount-large {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.expense-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.wf-form-row-4 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wf-form-row-4 > .wf-form-group {
    flex: 1;
    min-width: 100px;
}

/* Status Banner */
.wf-status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--bg-color);
}

.wf-status-banner-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
}

.wf-status-banner-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.wf-status-banner-title {
    font-size: 18px;
    font-weight: 600;
}

.wf-status-banner-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.wf-status-banner-draft {
    background: var(--bg-color);
}
.wf-status-banner-draft .wf-status-banner-icon {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.wf-status-banner-pending {
    background: var(--warning-light);
}
.wf-status-banner-pending .wf-status-banner-icon {
    background: rgba(255, 152, 0, 0.2);
    color: var(--warning-color);
}
.wf-status-banner-pending .wf-status-banner-title {
    color: #b06000;
}

.wf-status-banner-approved {
    background: var(--success-light);
}
.wf-status-banner-approved .wf-status-banner-icon {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
}
.wf-status-banner-approved .wf-status-banner-title {
    color: #2e7d32;
}

.wf-status-banner-paid {
    background: var(--primary-light);
}
.wf-status-banner-paid .wf-status-banner-icon {
    background: rgba(25, 118, 210, 0.2);
    color: var(--primary-color);
}
.wf-status-banner-paid .wf-status-banner-title {
    color: var(--primary-color);
}

.wf-status-banner-rejected {
    background: var(--danger-light);
}
.wf-status-banner-rejected .wf-status-banner-icon {
    background: rgba(244, 67, 54, 0.2);
    color: var(--danger-color);
}
.wf-status-banner-rejected .wf-status-banner-title {
    color: #c62828;
}

/* ==========================================================================
   Priority Badges
   ========================================================================== */
.wf-priority {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.wf-priority-urgent {
    background: var(--danger-light);
    color: var(--danger-color);
}

.wf-priority-high {
    background: var(--warning-light);
    color: #b06000;
}

.wf-priority-normal {
    background: var(--bg-color);
    color: var(--text-secondary);
}

.wf-priority-low {
    background: var(--success-light);
    color: var(--success-color);
}

/* ==========================================================================
   Timeline (承認履歴)
   ========================================================================== */
.wf-timeline {
    position: relative;
    padding-left: 32px;
}

.wf-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.wf-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.wf-timeline-item:last-child {
    padding-bottom: 0;
}

.wf-timeline-marker {
    position: absolute;
    left: -32px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.wf-timeline-marker.approved {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.wf-timeline-marker.rejected {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.wf-timeline-marker.pending {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

.wf-timeline-marker.skipped {
    background: var(--text-muted);
    border-color: var(--text-muted);
    color: white;
}

.wf-timeline-content {
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}

.wf-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.wf-timeline-title {
    font-weight: 500;
    color: var(--text-primary);
}

.wf-timeline-date {
    font-size: 12px;
    color: var(--text-muted);
}

.wf-timeline-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.wf-timeline-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 12px;
}

.wf-timeline-comment {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

/* ==========================================================================
   Progress Flow (Rakumo Style)
   ========================================================================== */
.wf-progress-flow {
    font-size: 13px;
}

.wf-progress-step {
    margin-bottom: 0;
}

.wf-progress-step-header {
    display: flex;
    align-items: flex-start;
    padding: 12px 0 8px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

.wf-progress-step-number {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-right: 4px;
}

.wf-progress-step-info {
    flex: 1;
}

.wf-progress-step-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wf-progress-step-type {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.wf-progress-step-body {
    position: relative;
    padding-left: 24px;
}

.wf-progress-line {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4a9c4a;
}

.wf-progress-step:last-child .wf-progress-line {
    bottom: 50%;
}

.wf-progress-step.current .wf-progress-line,
.wf-progress-step:not(.completed) .wf-progress-line {
    background: #ccc;
}

.wf-progress-step.completed .wf-progress-line {
    background: #4a9c4a;
}

.wf-progress-approval-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.wf-progress-approval-row:last-child {
    border-bottom: none;
}

.wf-progress-datetime {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
    min-width: 100px;
}

.wf-progress-waiting {
    color: #f0ad4e;
    font-weight: 600;
}

.wf-progress-badge-wrapper {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.wf-progress-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.wf-progress-badge-approved {
    background: #4a9c4a;
}

.wf-progress-badge-rejected {
    background: #dc3545;
}

.wf-progress-badge-confirmed {
    background: #17a2b8;
}

.wf-progress-badge-remanded {
    background: #f0ad4e;
    color: #333;
}

.wf-progress-badge-skipped {
    background: #6c757d;
}

.wf-progress-badge-pending {
    background: #e9ecef;
    color: #6c757d;
    border: 2px dashed #adb5bd;
}

.wf-progress-approver-info {
    flex: 1;
    min-width: 0;
}

.wf-progress-approver-name {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.wf-progress-approver-dept {
    font-size: 11px;
    color: #666;
}

.wf-progress-comment {
    margin-top: 6px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-left: 3px solid #4a9c4a;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.wf-progress-pending .wf-progress-approver-name {
    color: #666;
}

/* Responsive adjustments for progress flow */
@media (max-width: 768px) {
    .wf-progress-approval-row {
        flex-wrap: wrap;
    }
    
    .wf-progress-datetime {
        min-width: 80px;
    }
    
    .wf-progress-badge {
        width: 40px;
        height: 40px;
        font-size: 11px;
    }
}

/* ==========================================================================
   Data Display (申請詳細)
   ========================================================================== */
.wf-data-section {
    margin-bottom: 24px;
}

.wf-data-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 16px;
}

.wf-data-table {
    width: 100%;
}

.wf-data-table tr {
    border-bottom: 1px solid var(--border-color);
}

.wf-data-table th {
    width: 200px;
    padding: 12px 16px;
    background: var(--bg-color);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: left;
    vertical-align: top;
}

.wf-data-table td {
    padding: 12px 16px;
    color: var(--text-primary);
}

/* ==========================================================================
   Modal
   ========================================================================== */

/* グローバルモーダル（footer.php の .wf-modal-overlay が親の構造） */
.wf-modal-overlay#wf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.wf-modal-overlay#wf-modal.active {
    display: flex;
}

.wf-modal-overlay#wf-modal > .wf-modal {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
}

/* 新しいモーダル構造（.wf-modal が親、members.php等） */
.wf-modal:not(.wf-modal-overlay > .wf-modal) {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.wf-modal:not(.wf-modal-overlay > .wf-modal).active,
.wf-modal:not(.wf-modal-overlay > .wf-modal).is-active {
    display: block;
}

.wf-modal > .wf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

.wf-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100000;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wf-modal-container.wf-modal-lg {
    max-width: 700px;
}

.wf-modal-container.wf-modal-sm {
    max-width: 400px;
}

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

.wf-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.wf-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

.wf-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.wf-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.wf-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.wf-tab {
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.wf-tab:hover {
    color: var(--primary-color);
}

.wf-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.wf-tab-content {
    display: none;
}

.wf-tab-content.active {
    display: block;
}

/* ==========================================================================
   Stats Cards
   ========================================================================== */
.wf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.wf-stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.wf-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.wf-stat-value {
    font-size: 32px;
    font-weight: 500;
    color: var(--text-primary);
}

.wf-stat-card.primary {
    background: var(--primary-color);
}

.wf-stat-card.primary .wf-stat-label,
.wf-stat-card.primary .wf-stat-value {
    color: white;
}

/* ==========================================================================
   Attachments
   ========================================================================== */
.wf-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wf-attachment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
}

.wf-attachment:hover {
    background: var(--border-color);
    text-decoration: none;
}

.wf-attachment .dashicons {
    color: var(--text-muted);
}

.wf-attachment-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: background-color 0.15s ease;
}

.wf-attachment-item:hover {
    background: var(--border-color);
}

.wf-attachment-item .attachment-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-attachment-item .attachment-size {
    font-size: 12px;
    color: var(--text-muted);
}

.wf-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

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

.wf-btn-danger-text {
    color: var(--danger-color);
}

.wf-btn-danger-text:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   Filters - Modern UI/UX
   ========================================================================== */
.wf-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.wf-filter-select {
    min-width: 160px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.wf-filter-select:hover {
    border-color: #cbd5e1;
    background-color: #fafafa;
}

.wf-filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%231a73e8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.wf-search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 400px;
}

.wf-search-box input {
    width: 100%;
    padding: 10px 14px 10px 44px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wf-search-box input::placeholder {
    color: #94a3b8;
}

.wf-search-box input:hover {
    border-color: #cbd5e1;
}

.wf-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.wf-search-box .dashicons {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: color 0.2s;
}

.wf-search-box:focus-within .dashicons {
    color: var(--primary-color);
}

/* ==========================================================================
   Timecard
   ========================================================================== */
.wf-timecard-display {
    text-align: center;
    padding: 40px;
}

.wf-timecard-time {
    font-size: 64px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.wf-timecard-date {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.wf-timecard-status {
    font-size: 16px;
    margin-bottom: 24px;
}

.wf-timecard-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.wf-timecard-btn {
    padding: 16px 48px;
    font-size: 18px;
    border-radius: var(--radius);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.wf-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.wf-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.wf-empty-title {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Route Builder (承認経路設定)
   ========================================================================== */
.wf-route-steps {
    padding: 20px 0;
}

.wf-route-step {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.wf-route-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 13px;
    margin-right: 12px;
}

.wf-route-step-info {
    flex: 1;
}

.wf-route-step-name {
    font-weight: 500;
}

.wf-route-step-type {
    font-size: 12px;
    color: var(--text-muted);
}

.wf-route-step-actions {
    display: flex;
    gap: 8px;
}

.wf-route-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    color: var(--text-muted);
}

/* ==========================================================================
   グリッドレイアウト（レスポンシブ対応）
   ========================================================================== */
.wf-grid-2col {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

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

.wf-grid-form {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

@media (max-width: 900px) {
    .wf-grid-2col,
    .wf-grid-2col-equal,
    .wf-grid-form {
        grid-template-columns: 1fr;
    }
    
    .wf-grid-2col > *:last-child {
        position: static !important;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .wf-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .wf-sidebar.open {
        transform: translateX(0);
    }
    
    .wf-main {
        margin-left: 0;
    }
    
    .wf-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .wf-content {
        padding: 16px;
    }

    .wf-card-body,
    .wf-card-header,
    .wf-card-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .wf-form-row {
        grid-template-columns: 1fr;
    }
    
    .wf-data-table th {
        width: 120px;
    }
    
    .wf-timecard-time {
        font-size: 48px;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.wf-text-center { text-align: center; }
.wf-text-right { text-align: right; }
.wf-text-muted { color: var(--text-muted); }
.wf-text-success { color: var(--success-color); }
.wf-text-danger { color: var(--danger-color); }
.wf-mt-1 { margin-top: 8px; }
.wf-mt-2 { margin-top: 16px; }
.wf-mt-3 { margin-top: 24px; }
.wf-mb-1 { margin-bottom: 8px; }
.wf-mb-2 { margin-bottom: 16px; }
.wf-mb-3 { margin-bottom: 24px; }
.wf-flex { display: flex; }
.wf-flex-between { justify-content: space-between; }
.wf-flex-center { align-items: center; }
.wf-gap-1 { gap: 8px; }
.wf-gap-2 { gap: 16px; }
.wf-hidden { display: none; }

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

/* タブレット (768px以下) */
@media (max-width: 768px) {
    /* グリッドレイアウトを1カラムに */
    .wf-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .wf-sidebar {
        width: min(88vw, 320px);
    }
    
    /* 申請フォームのグリッド */
    [style*="grid-template-columns: 1fr 350px"],
    [style*="grid-template-columns: 1fr auto"] {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* カードタイトルのフレックス */
    .wf-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* ボタングループ */
    .wf-flex.wf-flex-between {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .wf-flex.wf-flex-end {
        flex-direction: column;
    }
    
    .wf-flex.wf-flex-end > * {
        width: 100%;
    }
    
    /* テーブルをカード形式に */
    .wf-table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .wf-table {
        min-width: 600px;
    }
    
    /* タイムライン */
    .wf-timeline-content {
        padding-left: 12px;
    }

    .wf-table th,
    .wf-table td {
        padding: 10px 12px;
    }
}

/* スマートフォン (480px以下) */
@media (max-width: 480px) {
    :root {
        --header-height: 56px;
    }
    
    /* コンテンツパディング */
    .wf-content {
        padding: 12px;
    }

    .wf-sidebar {
        width: calc(100vw - 24px);
        max-width: 320px;
    }
    
    /* ページタイトル */
    h1 {
        font-size: 20px !important;
    }
    
    /* カード */
    .wf-card {
        border-radius: var(--radius-sm);
    }
    
    .wf-card-body {
        padding: 16px;
    }
    
    .wf-card-header {
        padding: 12px 16px;
    }
    
    .wf-card-footer {
        padding: 12px 16px;
    }
    
    /* ボタン */
    .wf-btn {
        padding: 10px 16px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    .wf-btn-sm {
        padding: 6px 12px;
        width: auto;
    }
    
    /* フォーム */
    .wf-form-control,
    .wf-input,
    .wf-select,
    .wf-form-group input,
    .wf-form-group select,
    .wf-form-group textarea {
        font-size: 16px; /* iOS zoom防止 */
        padding: 12px;
    }
    
    .wf-form-row {
        gap: 12px;
    }
    
    .wf-half {
        flex: 1 1 100%;
    }
    
    /* ステータスバッジ */
    .wf-status,
    .wf-priority {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    /* 承認アイテム */
    .wf-approval-item .wf-card-body {
        padding: 16px;
    }
    
    .wf-approval-item [style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .wf-approval-item [style*="min-width: 120px"] {
        min-width: auto !important;
        flex-direction: row !important;
        gap: 8px !important;
    }
    
    .wf-approval-item [style*="min-width: 120px"] .wf-btn {
        flex: 1;
    }
    
    .wf-approval-meta {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* タイムカード */
    .wf-timecard-time {
        font-size: 36px !important;
    }
    
    .wf-timecard-actions {
        flex-direction: column;
    }
    
    .wf-timecard-actions .wf-btn {
        width: 100%;
    }
    
    /* データテーブル */
    .wf-data-table {
        display: block;
    }
    
    .wf-data-table tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--border-color);
        padding: 12px 0;
    }
    
    .wf-data-table th,
    .wf-data-table td {
        display: block;
        width: 100% !important;
        padding: 4px 0;
        border: none;
    }
    
    .wf-data-table th {
        background: transparent;
        font-weight: 600;
        color: var(--text-muted);
        font-size: 12px;
    }
    
    /* タイムライン */
    .wf-timeline-item {
        padding-left: 36px;
    }
    
    .wf-timeline-marker {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .wf-timeline-title {
        font-size: 14px;
    }
    
    /* 経路ステップ編集 */
    .route-step-item {
        padding: 12px;
    }
    
    .step-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .step-name-input {
        flex: 1 1 100%;
        order: 2;
    }
    
    .step-body {
        padding-left: 0;
    }
    
    /* モーダル */
    .wf-modal-content {
        margin: 8px;
        max-height: calc(100vh - 16px);
        border-radius: var(--radius-sm);
    }
    
    .wf-modal-header,
    .wf-modal-body,
    .wf-modal-footer {
        padding: 16px;
    }
    
    /* 空状態 */
    .wf-empty {
        padding: 32px 16px;
    }
    
    .wf-empty .dashicons {
        font-size: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    /* 申請詳細のボタングループ */
    .wf-flex.wf-gap-2 {
        flex-wrap: wrap;
    }

    .wf-header nav {
        display: none;
    }
    
    /* 統計カード */
    .wf-stat-card {
        padding: 16px;
    }
    
    .wf-stat-value {
        font-size: 28px;
    }
    
    /* 選択肢の表示 */
    select option {
        font-size: 14px;
        padding: 8px;
    }
    
    /* ヘッダー内のユーザー情報 */
    .wf-header-user span:not(.dashicons) {
        display: none;
    }
}

/* サイドバー開閉時のオーバーレイ */
.wf-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

@media (max-width: 1024px) {
    .wf-sidebar-overlay.active {
        display: block;
    }
    
    /* サイドバー開いている時のボディスクロール無効化 */
    body.wf-sidebar-open {
        overflow: hidden;
    }
}

/* タッチデバイス向け調整 */
@media (hover: none) and (pointer: coarse) {
    /* タップターゲットを大きく */
    .wf-nav-item a {
        padding: 14px 20px;
    }
    
    .wf-btn {
        min-height: 44px;
    }
    
    /* ホバー効果を無効化 */
    .wf-card:hover,
    .wf-btn:hover,
    .wf-nav-item a:hover {
        transform: none;
    }
    
    /* リンクのタップ領域を拡大 */
    .wf-approval-item h3 a {
        display: block;
        padding: 8px 0;
        margin: -8px 0;
    }
}

/* ==========================================================================
   ハンバーガーメニューボタン
   ========================================================================== */
.wf-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 101;
    flex-shrink: 0;
}

.wf-hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background 0.2s ease;
    margin: 0 auto;
}

.wf-hamburger::before,
.wf-hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s ease, top 0.3s ease;
}

.wf-hamburger::before {
    top: -7px;
}

.wf-hamburger::after {
    top: 7px;
}

/* ハンバーガーメニュー開いた時のアニメーション */
.wf-menu-toggle.is-active .wf-hamburger {
    background: transparent;
}

.wf-menu-toggle.is-active .wf-hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.wf-menu-toggle.is-active .wf-hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ==========================================================================
   拡張レスポンシブスタイル
   ========================================================================== */

/* タブレット (1024px以下) */
@media (max-width: 1024px) {
    .wf-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .wf-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    
    .wf-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .wf-main {
        margin-left: 0;
    }
    
    .wf-header {
        padding: 0 16px;
    }
    
    /* サイドバーロゴのクローズボタン追加エリア */
    .wf-sidebar-logo {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .wf-sidebar-close {
        display: flex;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        color: var(--text-muted);
        font-size: 20px;
        border-radius: 50%;
        transition: background 0.2s;
    }
    
    .wf-sidebar-close:hover {
        background: var(--bg-color);
        color: var(--text-primary);
    }
}

/* モバイル (768px以下) */
@media (max-width: 768px) {
    .wf-header {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
        padding: 12px 16px;
        gap: 8px;
    }
    
    .wf-header > .wf-flex:first-child {
        width: 100%;
    }
    
    .wf-header > .wf-flex:last-child {
        display: none;
    }
    
    /* パンくずリスト調整 */
    .wf-header nav {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* フィルター */
    .wf-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wf-filter-select,
    .wf-search-box {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    /* テーブル横スクロール対応 */
    .wf-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .wf-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .wf-table-wrapper .wf-table {
        min-width: 600px;
    }

    .wf-table-container .wf-table {
        min-width: 600px;
    }
    
    /* カードヘッダー */
    .wf-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .wf-card-header .wf-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* 統計グリッド */
    .wf-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    /* タブ */
    .wf-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .wf-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .wf-tab {
        flex-shrink: 0;
        padding: 12px 16px;
        white-space: nowrap;
    }
}

/* スマートフォン (480px以下) */
@media (max-width: 480px) {
    /* 統計カードを1列に */
    .wf-stats {
        grid-template-columns: 1fr;
    }
    
    /* ボタングループ縦並び */
    .wf-btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .wf-btn-group .wf-btn {
        width: 100%;
    }
    
    /* モーダル */
    .wf-modal-container {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .wf-modal-body {
        max-height: calc(100vh - 140px);
    }
    
    /* カレンダー日付グリッド */
    .wf-calendar-day {
        font-size: 12px;
    }
    
    /* ナビゲーション */
    .wf-nav-item {
        padding: 14px 20px;
    }
}

/* ==========================================================================
   テーブルのカード形式表示（小画面用）
   ========================================================================== */
@media (max-width: 600px) {
    .wf-table-card-mode thead {
        display: none;
    }
    
    .wf-table-card-mode tbody {
        display: block;
    }
    
    .wf-table-card-mode tr {
        display: block;
        padding: 16px;
        margin-bottom: 8px;
        background: var(--bg-white);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
    }
    
    .wf-table-card-mode td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .wf-table-card-mode td:last-child {
        border-bottom: none;
    }
    
    .wf-table-card-mode td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        font-size: 12px;
        margin-right: 16px;
    }
}

/* ==========================================================================
   ランドスケープ（横向き）対応
   ========================================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .wf-sidebar {
        padding-bottom: 80px;
    }
    
    .wf-modal-body {
        max-height: 60vh;
    }
    
    .wf-timecard-time {
        font-size: 32px !important;
    }
}

/* ==========================================================================
   印刷用スタイル
   ========================================================================== */
@media print {
    .wf-sidebar,
    .wf-header,
    .wf-menu-toggle,
    .wf-sidebar-overlay,
    .wf-btn,
    .wf-modal {
        display: none !important;
    }
    
    .wf-main {
        margin-left: 0 !important;
    }
    
    .wf-content {
        padding: 0 !important;
        max-width: none !important;
    }
    
    .wf-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
}

/* ヘッダーとコンテナの間のグラデーションライン */
.gradient-line {
  height: 4px;
  background: linear-gradient(
    90deg,
    #4eb9ee,
    #719af4,
    #8554b2,
    #e28797,
    #d19263,
    #78b38b
  );
  margin: 0;
  padding: 0;
}
