:root {
    /* Color Palette - Premium Dark Theme */
    --bg-color: #0d0f14;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.gap-8 {
    gap: 8px;
}

.mt-24 {
    margin-top: 24px;
}

.p-20 {
    padding: 20px;
}

.p-24 {
    padding: 24px;
}

.app-container {
    display: flex;
    height: 100vh;
    padding: 16px;
    gap: 16px;
}

/* Glassmorphism Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.glass-input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    outline: none;
    transition: border 0.2s;
}

.glass-input:focus {
    border-color: var(--primary);
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 8px;
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
}

nav li {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

nav li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

nav li.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.top-bar {
    height: 72px;
    border-radius: var(--radius);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.clock {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--accent-light);
    letter-spacing: 1px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

/* View Container */
.view-content {
    flex: 1;
    overflow-y: auto;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Customer Detail Modal Enhancements */
.customer-details-container {
    color: var(--text-primary);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.detail-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--accent-light);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-light);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.btn-line {
    background: #06C755;
    color: white;
    font-size: 0.8rem;
    padding: 8px 16px;
}

.btn-line:hover {
    background: #05b04a;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.bike-card-mini {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.bike-model {
    font-weight: 600;
    font-size: 0.95rem;
}

.bike-serial {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.log-item {
    padding: 12px;
    border-left: 2px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
}

.log-date {
    font-size: 0.75rem;
    color: var(--accent-light);
    margin-bottom: 4px;
}

.log-work {
    font-weight: 600;
    font-size: 0.9rem;
}

.log-notes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.mt-8 {
    margin-top: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius);
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
}

.hidden {
    display: none;
}

/* Modal Header & Close Button */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.75rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding-bottom: 4px;
    /* Adjustment for center alignment */
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
}

.status-dot.warning {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.success {
    color: var(--success);
}

.status-dot.success {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Dashboard & Animation Update */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.dashboard-main,
.dashboard-side {
    padding: 24px;
    border-radius: var(--radius);
}

.focus-card {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid var(--accent-light);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.focus-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.focus-customer {
    color: var(--accent-light);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.focus-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Animations */
.slide-up {
    animation: slideUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Adjustments (Focus: Task Input & Details) */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        padding: 8px;
        overflow-y: auto;
        height: auto;
    }

    body {
        height: auto;
        overflow-y: auto;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 16px;
        padding: 16px;
    }

    .logo {
        margin-bottom: 24px;
    }

    .sidebar-footer {
        display: none;
    }

    .top-bar {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 12px;
    }

    .search-box {
        width: 100%;
        order: 2;
        margin-top: 12px;
    }

    .modal-content {
        max-width: 95%;
        padding: 16px;
        margin: 10px;
    }

    .grid-2,
    .task-detail-grid,
    .dashboard-layout {
        grid-template-columns: 1fr !important;
    }

    .task-info-panel {
        position: static;
        margin-bottom: 16px;
    }

    .detail-table {
        display: block;
        overflow-x: auto;
    }

    .sync-status {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-full {
    grid-column: 1 / -1;
}

.modal-form label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.glass-select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: white;
    outline: none;
    appearance: none;
    /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.glass-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* File Input Sytling */
.file-upload-box {
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-upload-box:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Placeholder Transparency */
::placeholder {
    color: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

/* Image Preview Styling */
.file-upload-box {
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 200px;
    border-radius: 4px;
}

.remove-img-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.remove-img-btn:hover {
    background: #ef4444;
}

/* Zoom Modal */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: zoom-out;
}

.image-zoom-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);

}

/* Authentication Overlay */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
}

.auth-card .logo {
    justify-content: center;
}

.text-danger {
    color: #ef4444;
}

.w-full {
    width: 100%;
}

.mb-24 {
    margin-bottom: 24px;
}

.text-center {
    text-align: center;
}
/* FullCalendar Dark Theme Overrides */
:root {
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-button-text-color: #fff;
    --fc-button-bg-color: #2c3333;
    --fc-button-border-color: #2c3333;
    --fc-button-hover-bg-color: #3e4e50;
    --fc-button-hover-border-color: #3e4e50;
    --fc-button-active-bg-color: #1e293b;
    --fc-button-active-border-color: #0f172a;
    --fc-event-bg-color: #3b82f6;
    --fc-event-border-color: #2563eb;
    --fc-today-bg-color: rgba(255, 255, 255, 0.03);
    --fc-neutral-bg-color: rgba(255, 255, 255, 0.03);
    --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.05);
    --fc-page-bg-color: transparent;
}

.fc {
    color: var(--text-main);
}

.fc-theme-standard .fc-scrollgrid {
    border-color: var(--fc-border-color);
}

.fc-theme-standard td, 
.fc-theme-standard th {
    border-color: var(--fc-border-color);
}

.fc-col-header-cell-cushion,
.fc-daygrid-day-number {
    color: var(--text-secondary);
    text-decoration: none !important;
}

.fc-col-header-cell-cushion:hover,
.fc-daygrid-day-number:hover {
    color: var(--text-main);
}

/* Helper for today's highlighting */
.fc-day-today {
    background-color: rgba(79, 70, 229, 0.1) !important;
}

/* Buttons */
.fc-button-primary {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: white !important;
    transition: all 0.2s;
}

.fc-button-primary:hover,
.fc-button-primary:focus {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

.fc-button-active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Toolbar Title */
.fc-toolbar-title {
    font-size: 1.25rem !important;
    font-weight: 600;
}

/* Events */
.fc-event {
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* TimeGrid slots */
.fc-timegrid-slot-label-cushion {
    color: var(--text-secondary);
}

.fc-timegrid-axis-cushion {
    color: var(--text-secondary);
}

/* List View */
.fc-list {
    border-color: var(--border-color);
}
.fc-list-day-cushion {
    background-color: rgba(255,255,255,0.05) !important;
}
.fc-list-event:hover td {
    background-color: rgba(255,255,255,0.05) !important;
}
