/* ============================================================
   ML-業務 システム CSS
   Mobile-first responsive design
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #ca8a04;
    --warning-light: #fef9c3;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --sidebar-width: 260px;
    --header-height: 56px;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--gray-100);
}

.hidden { display: none !important; }

/* ============================================================
   Login Screen
   ============================================================ */

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    text-align: center;
}

.login-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--gray-500);
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

.login-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: var(--border-radius);
    display: none;
}

.login-message.show { display: block; }
.login-message.success { background: var(--success-light); color: var(--success); }
.login-message.error { background: var(--danger-light); color: var(--danger); }

/* ============================================================
   App Layout
   ============================================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Header (Mobile) */
.app-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.app-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.menu-toggle {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--gray-600);
    border-radius: 1px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gray-600);
}

.btn-icon:hover {
    background: var(--gray-100);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.sidebar-logo-image {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: none;
}

.sidebar-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    text-align: left;
    align-self: flex-start;
}

.sidebar-company-name {
    width: 100%;
    margin-left: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    line-height: 1.3;
    text-align: left;
    align-self: flex-start;
}

body.privacy-blur-company .sidebar-company-name {
    filter: blur(6px);
    user-select: none;
}

/* Demo mode overlay */
body.demo-mode #demo-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}

.demo-panel {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 260px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    border-radius: 14px;
    padding: 12px 12px 10px;
    pointer-events: auto;
}

.demo-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.demo-panel-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-900);
}

.demo-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.demo-close-btn:hover {
    color: var(--gray-900);
}

.demo-timer {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.demo-timer-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-700);
}

.demo-timer-row strong {
    font-size: 12px;
    color: var(--gray-900);
}

.demo-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-bubble {
    position: fixed;
    bottom: 160px;
    left: 16px;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
    border-radius: 14px;
    padding: 14px 16px 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms ease;
    pointer-events: auto;
}

.demo-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

.demo-bubble-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.demo-bubble-text {
    font-size: 12px;
    color: var(--gray-700);
    line-height: 1.5;
}

.demo-bubble-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-start-btn {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--primary);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #ffffff;
    cursor: pointer;
}

.demo-start-btn:hover {
    filter: brightness(0.95);
}

.demo-stop-btn {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--gray-100);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--gray-700);
    cursor: pointer;
}

.demo-stop-btn:hover {
    background: var(--gray-200);
}

@media (max-width: 768px) {
    .demo-bubble {
        left: 12px;
        right: 12px;
        max-width: none;
        bottom: 12px;
    }

    .demo-panel {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 12px;
    }
}

.sidebar-user-block {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-user-dept {
    font-size: 12px;
    color: var(--gray-500);
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-section {
    padding: 16px 20px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .app-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-open .sidebar-overlay {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: calc(var(--header-height) + 16px);
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
}

/* ============================================================
   Page Components
   ============================================================ */

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

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

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

.executive-dashboard {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(250, 246, 238, 0.9), transparent 70%),
                radial-gradient(900px 500px at 90% 10%, rgba(232, 239, 246, 0.6), transparent 65%);
    border-radius: 20px;
    padding: 12px 12px 40px;
}

.executive-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
    background: linear-gradient(135deg, #101113 0%, #1c1f23 50%, #23262b 100%);
    color: #f6f3eb;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 20, 30, 0.25);
}

.executive-hero-content {
    font-family: "Iowan Old Style", "Palatino", "Times New Roman", serif;
}

.executive-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: rgba(246, 243, 235, 0.7);
    margin-bottom: 12px;
}

.executive-title {
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 16px;
}

.executive-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: rgba(246, 243, 235, 0.8);
}

.executive-insights {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.executive-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kpi-inline {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.btn-glow {
    box-shadow: 0 10px 20px rgba(38, 50, 64, 0.3);
}

.timeline-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.timeline-speed {
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid rgba(246, 243, 235, 0.25);
    background: transparent;
    color: rgba(246, 243, 235, 0.85);
    font-size: 12px;
}

.dept-select {
    color: var(--gray-800);
    border-color: var(--gray-200);
    background: #fff;
}

.timeline-label {
    font-size: 12px;
    color: rgba(246, 243, 235, 0.75);
    padding-left: 6px;
}

.insight-chip {
    background: rgba(246, 243, 235, 0.12);
    border: 1px solid rgba(246, 243, 235, 0.2);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: rgba(246, 243, 235, 0.85);
}

.executive-hero-kpis {
    display: grid;
    gap: 12px;
}

.kpi-tile {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(6px);
}

.kpi-label {
    font-size: 12px;
    color: rgba(246, 243, 235, 0.7);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
}

.kpi-sub {
    font-size: 12px;
    color: rgba(246, 243, 235, 0.6);
    margin-top: 6px;
}

.kpi-footnote {
    font-size: 12px;
    color: rgba(246, 243, 235, 0.65);
    margin-top: 6px;
    text-align: right;
}

.kpi-spark {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    align-items: flex-end;
    height: 28px;
}

.kpi-spark span {
    width: 6px;
    border-radius: 999px;
    background: rgba(246, 243, 235, 0.55);
}

.executive-dashboard .card {
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(18, 24, 33, 0.08);
}

.pl-graph {
    display: grid;
    gap: 12px;
}

.pl-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 1.5fr auto auto;
    gap: 12px;
    align-items: center;
}

.pl-title {
    font-size: 13px;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-bar {
    height: 10px;
    background: var(--gray-100);
    border-radius: 999px;
    overflow: hidden;
}

.pl-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2d6cdf, #6aa6ff);
    transform-origin: left;
    transform: scaleX(0);
}

.pl-value {
    font-size: 12px;
    font-weight: 600;
}

.pl-rate {
    font-size: 12px;
    color: var(--gray-500);
}

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

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-value.positive { color: var(--success); }
.stat-value.negative { color: var(--danger); }

.stat-change {
    font-size: 12px;
    margin-top: 4px;
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

.form-row .form-group {
    margin-bottom: 0;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ============================================================
   Tables
   ============================================================ */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-600);
    white-space: nowrap;
}

tr:hover {
    background: var(--gray-50);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ============================================================
   P/L Dashboard Table
   ============================================================ */

.pl-table {
    font-size: 13px;
}

.pl-table th,
.pl-table td {
    padding: 8px 12px;
}

.pl-table .customer-row {
    background: var(--gray-100);
    font-weight: 600;
}

.pl-table .project-row td:first-child {
    padding-left: 32px;
}

.pl-table .category-row td:first-child {
    padding-left: 48px;
    color: var(--gray-600);
}

.pl-table .total-row {
    background: var(--gray-800);
    color: white;
    font-weight: 600;
}

.pl-table .amount {
    font-family: "SF Mono", Monaco, "Consolas", monospace;
    font-size: 12px;
}

/* P/L Detail */
.project-pl-detail {
    transition: background-color 0.2s;
}

.project-pl-detail:hover {
    background-color: var(--gray-50);
}

.pl-detail-table td {
    border-bottom: 1px solid var(--gray-100);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

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

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-400);
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

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

/* ============================================================
   Toast Notifications
   ============================================================ */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    background: var(--gray-800);
    color: white;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

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

/* ============================================================
   Loading & Empty States
   ============================================================ */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============================================================
   Mobile List View
   ============================================================ */

@media (max-width: 768px) {
    .mobile-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-list-item {
        background: white;
        border-radius: var(--border-radius);
        padding: 16px;
        box-shadow: var(--shadow);
    }
    
    .mobile-list-title {
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .mobile-list-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        font-size: 13px;
        color: var(--gray-500);
    }
    
    .mobile-list-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--gray-200);
    }
    
    .desktop-table {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-list {
        display: none;
    }
}

/* ============================================================
   Utility Classes
   ============================================================ */

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.text-sm { font-size: 13px; }

/* Staff dashboard view toggle and status grouping */
.dashboard-view-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-view-toggle .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.table-section-row td {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.mobile-section-title {
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--gray-700);
}

/* Bank accounts (company settings) */
.bank-account-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.bank-accounts-list {
    margin-top: 10px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px;
    background: var(--gray-50);
}

.bank-account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.bank-account-main {
    font-size: 11px;
    color: var(--success);
    min-width: 48px;
}

.bank-account-name {
    flex: 1;
    font-size: 13px;
    color: var(--gray-800);
}

.bank-account-actions {
    display: flex;
    gap: 6px;
}
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ============================================================
   krewDashboard Style Table (P/L Detail)
   ============================================================ */

.krew-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
    min-width: 1200px;
}

.krew-table th,
.krew-table td {
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    vertical-align: middle;
}

/* Header styles */
.krew-table .header-row-1 th,
.krew-table .header-row-2 th {
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.krew-table .year-header {
    background: linear-gradient(180deg, #1e5799 0%, #2989d8 100%);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 8px 4px;
}

.krew-table .year-header.collapsed {
    background: #4a90c2;
}

/* Column widths */
.krew-table .col-customer {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
}

.krew-table .col-project {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.krew-table .col-category {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
}

.krew-table .col-account {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.krew-table .month-col {
    width: 85px;
    min-width: 85px;
    font-family: "SF Mono", Monaco, "Consolas", monospace;
    font-size: 11px;
}

.krew-table .subtotal-col {
    background: rgba(0, 0, 0, 0.05);
}

/* Row styles - さらに薄い色で統一 */
.krew-table .customer-row {
    background: #f8fafc;
    cursor: pointer;
}

.krew-table .customer-row:hover {
    background: #f1f5f9;
}

.krew-table .customer-row .col-customer {
    background: #f8fafc;
    font-weight: 600;
}

.krew-table .customer-row:hover .col-customer {
    background: #f1f5f9;
}

.krew-table .project-row {
    background: #fafafa;
    cursor: pointer;
}

.krew-table .project-row:hover {
    background: #f5f5f5;
}

.krew-table .project-row .col-customer {
    background: #fafafa;
}

.krew-table .project-row:hover .col-customer {
    background: #f5f5f5;
}

.krew-table .category-row {
    background: white;
    cursor: pointer;
}

.krew-table .category-row:hover {
    background: #fafafa;
}

.krew-table .category-row .col-customer {
    background: white;
}

.krew-table .category-row:hover .col-customer {
    background: #fafafa;
}

.krew-table .sales-category {
    background: #fffef5;
}

.krew-table .sales-category .col-customer {
    background: #fffef5;
}

.krew-table .cost-category {
    background: #fffafa;
}

.krew-table .cost-category .col-customer {
    background: #fffafa;
}

.krew-table .item-row {
    background: white;
}

.krew-table .item-row .col-customer {
    background: white;
}

.krew-table .sales-item {
    background: #fffef5;
}

.krew-table .sales-item .col-customer {
    background: #fffef5;
}

.krew-table .cost-item {
    background: #fffafa;
}

.krew-table .cost-item .col-customer {
    background: #fffafa;
}

.krew-table .subtotal-row {
    font-weight: 600;
}

.krew-table .sales-subtotal {
    background: #fefce8;
}

.krew-table .sales-subtotal .col-customer {
    background: #fefce8;
}

.krew-table .cost-subtotal {
    background: #fef2f2;
}

.krew-table .cost-subtotal .col-customer {
    background: #fef2f2;
}

/* Profit subtotal row (粗利行) */
.krew-table .profit-subtotal-row {
    background: #e8f4e8;
    font-weight: 700;
}

.krew-table .profit-subtotal-row .col-customer {
    background: #e8f4e8;
}

.krew-table .profit-subtotal-row td {
    border-top: 2px solid #16a34a;
}

/* 折りたたみ */
.krew-table tr.collapsed-row {
    display: none;
}

/* 階層レベルのインデント強調 */
.krew-table .level-1 .col-project {
    padding-left: 20px;
}

.krew-table .level-2 .col-category {
    padding-left: 8px;
}

.krew-table .level-3 .col-account {
    padding-left: 12px;
}

.krew-table .customer-total-row {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 600;
}

.krew-table .customer-total-row .col-customer {
    background: #f1f5f9;
}

.krew-table .grand-total-row {
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 700;
}

.krew-table .grand-total-row .col-customer {
    background: #e2e8f0;
}

/* Expand/collapse icon */
.krew-table .expand-icon {
    display: inline-block;
    width: 16px;
    margin-right: 4px;
    font-family: sans-serif;
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
}

/* Value colors */
.krew-table .sales-value {
    color: var(--primary);
}

.krew-table .cost-value {
    color: var(--danger);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .krew-table {
        font-size: 11px;
    }

    .krew-table th,
    .krew-table td {
        padding: 4px 6px;
    }

    .krew-table .col-customer {
        width: 140px;
        min-width: 140px;
    }

    .krew-table .col-project {
        width: 180px;
        min-width: 180px;
    }

    .krew-table .month-col {
        width: 70px;
        min-width: 70px;
        font-size: 10px;
    }
}

/* ============================================================
   PDF Upload / OCR Styles
   ============================================================ */

.pdf-upload-container {
    padding: 8px 0;
}

.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.02);
}

.upload-placeholder p {
    color: var(--gray-500);
    margin: 0;
    font-size: 13px;
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.selected-file span {
    font-weight: 500;
    color: var(--gray-700);
}

#ocr-progress {
    margin-top: 16px;
}

.progress-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    color: var(--primary-dark);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ocr-result-form {
    padding-top: 8px;
}

.ocr-success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--success-light);
    border-radius: var(--border-radius);
    color: var(--success);
    font-weight: 500;
    margin-bottom: 16px;
}

.line-items-table {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
    max-height: 200px;
    overflow-y: auto;
}

.line-items-table table {
    width: 100%;
    font-size: 12px;
}

.line-items-table th {
    background: var(--gray-100);
    font-weight: 500;
    text-align: left;
}

.line-items-table th,
.line-items-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-200);
}

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

/* ============================================================
   Cashflow Dashboard
   ============================================================ */

.fiscal-year-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-right: 12px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 16px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

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

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

.tab-content {
    min-height: 200px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-xs {
    padding: 2px 8px;
    font-size: 11px;
}

.btn-xs + .btn-xs {
    margin-left: 4px;
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stats-grid-4-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid-4-compact .stat-card {
    padding: 12px;
}

.stats-grid-4-compact .stat-label {
    font-size: 11px;
}

.stats-grid-4-compact .stat-value {
    font-size: 20px;
}

.stats-grid-4-compact .badge {
    font-size: 11px;
    padding: 2px 6px;
}

@media (max-width: 1024px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid-4-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid-4-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
}

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

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card-legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--gray-500);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Cashflow Chart */
.cashflow-chart {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 200px;
    padding: 20px 0;
    overflow-x: auto;
}

.chart-column {
    flex: 1;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chart-column.forecast {
    opacity: 0.7;
}

.chart-column.current {
    background: var(--primary-light);
    border-radius: 4px;
    padding: 4px;
    margin: -4px;
}

.chart-bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 120px;
    width: 100%;
    justify-content: center;
}

.chart-bar {
    width: 16px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
    min-height: 2px;
    transform-origin: bottom;
    transform: scaleY(0);
    position: relative;
    overflow: hidden;
}

.motion-block.animate-on .chart-bar {
    animation: chart-rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay, 0s);
}

.motion-block.animate-on .pl-bar span {
    animation: pl-fill 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay, 0s);
}

.chart-bar.income {
    background: var(--primary);
}

.chart-bar.expense {
    background: var(--danger);
}

.executive-dashboard .chart-bar.income {
    background: linear-gradient(180deg, #1b2530, #3f566a);
}

.executive-dashboard .chart-bar.expense {
    background: linear-gradient(180deg, #642f2f, #b64b4b);
}

.executive-dashboard .chart-column.current {
    background: rgba(16, 17, 19, 0.08);
}

.executive-dashboard .chart-column.timeline-active {
    background: rgba(16, 17, 19, 0.12);
    border-radius: 6px;
    padding: 4px;
    margin: -4px;
}

.executive-dashboard .chart-column.timeline-dim {
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.executive-bidirectional-chart {
    position: relative;
    height: 300px;
    margin-top: 6px;
}

.executive-bidirectional-chart .y-axis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 70px;
    padding-right: 8px;
}

.executive-bidirectional-chart .y-tick {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-500);
    font-size: 11px;
}

.executive-bidirectional-chart .y-tick span {
    width: 56px;
    text-align: right;
    color: var(--gray-500);
}

.executive-bidirectional-chart .y-tick i {
    flex: 1;
    height: 1px;
    background: var(--gray-100);
}

.executive-bidirectional-chart .y-tick.zero span {
    font-weight: 600;
    color: var(--gray-700);
}

.executive-bidirectional-chart .y-tick.zero i {
    background: var(--gray-300);
}

.executive-bidirectional-chart .chart-baseline {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--gray-200);
}

.executive-bidirectional-chart .net-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.executive-bidirectional-chart .net-line polyline {
    fill: none;
    stroke: #2d6cdf;
    stroke-width: 0.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.executive-bidirectional-chart .chart-columns {
    position: relative;
    display: flex;
    gap: 8px;
    height: 100%;
    align-items: center;
    padding: 0 6px 0 78px;
}

.executive-bidirectional-chart .chart-col {
    flex: 1;
    min-width: 42px;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.executive-bidirectional-chart .chart-col.current {
    background: rgba(16, 17, 19, 0.06);
    border-radius: 10px;
}

.executive-bidirectional-chart .bar {
    position: absolute;
    width: 14px;
    border-radius: 3px 3px 0 0;
    transition: transform 0.6s ease;
}

.executive-bidirectional-chart .bar.income {
    bottom: 50%;
    height: calc(var(--income) * 1%);
    background: linear-gradient(180deg, #1f4fd6, #5b8cff);
    transform-origin: bottom;
    animation: chart-rise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay, 0s);
}

.executive-bidirectional-chart .bar.expense {
    top: 50%;
    height: calc(var(--expense) * 1%);
    background: linear-gradient(180deg, #ff2e2e, #ff6b6b);
    transform-origin: top;
    animation: chart-rise-down 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay, 0s);
}

.executive-bidirectional-chart .bar.cost-internal {
    top: 50%;
    height: calc(var(--expense) * 1%);
    background: linear-gradient(180deg, #ff4dc4, #ff9fe1);
    transform-origin: top;
    animation: chart-rise-down 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay, 0s);
    transform: translateX(var(--offset, 0));
}

.executive-bidirectional-chart .bar.cost-external {
    top: 50%;
    height: calc(var(--expense) * 1%);
    background: linear-gradient(180deg, #ff2e2e, #ff6b6b);
    transform-origin: top;
    animation: chart-rise-down 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay, 0s);
    transform: translateX(var(--offset, 0));
}

.executive-bidirectional-chart .chart-label {
    position: absolute;
    bottom: -18px;
    font-size: 11px;
    color: var(--gray-500);
}

.table-compact th,
.table-compact td {
    font-size: 12px;
    padding: 8px 10px;
}

@keyframes chart-rise-down {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

.forecast-animate .chart-bar {
    transition: height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.forecast-block.wave-on .chart-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: translateX(-120%);
    animation: chart-shimmer 3.6s ease-in-out infinite;
    animation-delay: var(--wave, 0s);
    mix-blend-mode: screen;
}

@media (max-width: 1024px) {
    .executive-hero {
        grid-template-columns: 1fr;
    }
    .kpi-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .executive-hero {
        padding: 20px;
    }

    .executive-title {
        font-size: 22px;
    }

    .pl-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .pl-value,
    .pl-rate {
        justify-self: flex-start;
    }
    .kpi-inline {
        grid-template-columns: 1fr;
    }
}

@keyframes chart-rise {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

@keyframes pl-fill {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

@keyframes chart-shimmer {
    0% { transform: translateX(-120%); }
    50% { transform: translateX(20%); }
    100% { transform: translateX(120%); }
}

.chart-label {
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
}

.chart-balance {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.chart-balance.positive {
    color: var(--success);
}

.chart-balance.negative {
    color: var(--danger);
}

.chart-divider {
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--gray-300);
}

.divider-label {
    font-size: 11px;
    color: var(--gray-400);
}

/* Cashflow List */
.cashflow-list {
    max-height: 400px;
    overflow-y: auto;
}

.cashflow-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px 60px;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}

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

.cashflow-item.forecast {
    opacity: 0.8;
}

.cashflow-item.actual {
    background: var(--gray-50);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

.cashflow-date {
    color: var(--gray-500);
    font-size: 12px;
}

.cashflow-detail {
    min-width: 0;
}

.cashflow-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashflow-project {
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashflow-amount {
    text-align: right;
    font-weight: 500;
}

.cashflow-amount.positive {
    color: var(--primary);
}

.cashflow-amount.negative {
    color: var(--danger);
}

.cashflow-status {
    text-align: center;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-600);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}

@media (max-width: 640px) {
    .cashflow-item {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    
    .cashflow-date {
        grid-column: 1;
    }
    
    .cashflow-status {
        grid-column: 2;
        text-align: right;
    }
    
    .cashflow-detail {
        grid-column: 1 / -1;
    }
    
    .cashflow-amount {
        grid-column: 1 / -1;
        text-align: left;
    }
}

/* ============================================================
   Permission Table
   ============================================================ */

.permission-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.permission-table th,
.permission-table td {
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
}

.permission-table th {
    background: var(--gray-50);
    font-weight: 500;
    font-size: 13px;
}

.permission-table td {
    font-size: 14px;
}

.permission-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

/* Badge variants */
.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

/* Modal Large */
.modal-lg {
    max-width: 800px;
}

@media (max-width: 640px) {
    .modal-lg {
        max-width: 100%;
        margin: 10px;
    }
    
    .permission-table {
        font-size: 12px;
    }
    
    .permission-table th,
    .permission-table td {
        padding: 6px 4px;
    }
}

/* ============================================================
   Modal Backdrop (新モーダル用)
   ============================================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-backdrop .modal {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    max-width: 500px;
}

.modal-backdrop .modal.modal-lg {
    max-width: 800px;
}

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

.modal-backdrop .modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

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

.modal-backdrop .modal-close:hover {
    color: var(--gray-600);
}

.modal-backdrop .modal-body {
    padding: 20px;
}

.modal-backdrop .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}
