.sidebar-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scrollbar::-webkit-scrollbar-track {
    background: #374151;
}
.sidebar-scrollbar::-webkit-scrollbar-thumb {
    background: #6B7280;
    border-radius: 2px;
}
.fade-in {
    animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* カスタムスタイル */
.nav-item {
    transition: all 0.2s ease;
}

.nav-group-trigger {
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nav-group-trigger:hover {
    background: linear-gradient(180deg, rgba(71, 85, 105, 0.98), rgba(51, 65, 85, 0.98));
    transform: translateX(2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.nav-group-panel {
    margin-left: 0.4rem;
    padding: 0.55rem 0.45rem 0.35rem 0.9rem;
    border-left: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.32);
    border-radius: 0.75rem;
}

.nav-subitem {
    position: relative;
    font-size: 0.813rem;
    color: #e5e7eb !important;
    padding-left: 1rem;
}

.nav-subitem::before {
    content: "";
    position: absolute;
    left: -0.45rem;
    top: 50%;
    width: 0.35rem;
    height: 1px;
    background: rgba(148, 163, 184, 0.45);
    transform: translateY(-50%);
}

.nav-subitem-active::before {
    display: none;
}

.nav-subitem-active::after {
    content: "";
    position: absolute;
    left: -0.95rem;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #67e8f9;
    transform: translateY(-50%);
    filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.35));
}

.nav-subitem-active {
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.12);
}

.nav-subitem:hover {
    color: #ffffff !important;
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.nav-subitem i {
    color: #cbd5e1 !important;
}

.nav-item:hover {
    transform: translateX(2px);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: none;
    cursor: pointer;
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 150ms;
}
.btn-primary:hover {
    background-color: #374151;
}
.btn-primary:focus {
    outline: 2px solid transparent;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6b7280;
}

.btn-secondary {
    background-color: white;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 150ms;
}
.btn-secondary:hover {
    background-color: #f9fafb;
}
.btn-secondary:focus {
    outline: 2px solid transparent;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6b7280;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    line-height: 1.25rem;
    background-color: #fff;
}
.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.table-row:hover {
    background-color: #f9fafb;
}

.status-active {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #d1fae5;
    color: #065f46;
}

.status-inactive {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #fee2e2;
    color: #991b1b;
}

.status-pending {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #fef3c7;
    color: #92400e;
}

.status-warning {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #fed7aa;
    color: #c2410c;
}

.role-badge-admin,
.role-badge-dispatcher,
.role-badge-driver,
.role-badge-sales,
.role-badge-user,
.role-badge-default {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-badge-admin {
    background-color: #fee2e2;
    color: #991b1b;
}

.role-badge-dispatcher {
    background-color: #d1fae5;
    color: #065f46;
}

.role-badge-driver {
    background-color: #dbeafe;
    color: #1e40af;
}

.role-badge-sales {
    background-color: #fef3c7;
    color: #92400e;
}

.role-badge-user {
    background-color: #ede9fe;
    color: #6b21a8;
}

.role-badge-default {
    background-color: #f3f4f6;
    color: #374151;
}

.inspection-expired {
    position: relative;
    border: 2px solid #dc2626 !important;
    background: #fff1f2 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), 0 12px 24px rgba(220, 38, 38, 0.25);
    animation: alertPulse 2.6s ease-in-out infinite;
}

.inspection-expired .inspection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, #b91c1c, #ef4444);
    border: 1px solid #991b1b;
    letter-spacing: 0.02em;
}

.inspection-expired::after {
    content: "車検切れ";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc2626;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 9999px;
    transform: rotate(6deg);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

@keyframes alertPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), 0 12px 24px rgba(220, 38, 38, 0.25);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.35), 0 16px 28px rgba(220, 38, 38, 0.35);
    }
}

.calendar-travel {
    z-index: 1;
}

.calendar-travel::before,
.calendar-travel::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    height: 32px;
    background: rgba(251, 191, 36, 0.18);
    border: 1px dashed #f59e0b;
    pointer-events: none;
}

.calendar-travel::before {
    top: -32px;
    border-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
}

.calendar-travel::after {
    top: 100%;
    border-top: 0;
    border-radius: 0 0 0.5rem 0.5rem;
}

.calendar-travel > * {
    position: relative;
    z-index: 2;
}
