/* Pride Delivery Orders - Static Version */
/* Идентичные стили как в Next.js версии */

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Утилиты */
.min-h-screen {
    min-height: 100vh;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-white {
    background-color: #ffffff;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-red-600 {
    background-color: #dc2626;
}

.bg-red-700 {
    background-color: #b91c1c;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-gray-300 {
    background-color: #d1d5db;
}

.text-white {
    color: #ffffff;
}

.text-gray-900 {
    color: #111827;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-blue-600 {
    color: #2563eb;
}

.text-red-600 {
    color: #dc2626;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Отступы */
.p-1 {
    padding: 0.25rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-7 {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

.pt-4 {
    padding-top: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.flex-1 {
    flex: 1 1 0%;
}

.w-full {
    width: 100%;
}

.w-24 {
    width: 6rem;
}

.w-96 {
    width: 24rem;
}

.h-12 {
    height: 3rem;
}

.h-6 {
    height: 1.5rem;
}

.w-6 {
    width: 1.5rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-3 {
    width: 0.75rem;
}

.h-3 {
    height: 0.75rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

/* Grid */
.grid {
    display: grid;
}

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

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lg\:col-span-1 {
    grid-column: span 1 / span 1;
}

.lg\:col-span-2 {
    grid-column: span 2 / span 2;
}

/* Рамки и тени */
.border {
    border-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Фон и позиционирование */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-4 {
    top: 1rem;
}

.top-20 {
    top: 5rem;
}

.right-4 {
    right: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.z-50 {
    z-index: 50;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

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

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

.overflow-auto {
    overflow: auto;
}

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

.overflow-y-auto {
    overflow-y: auto;
}

.max-h-60 {
    max-height: 15rem;
}

.max-h-96 {
    max-height: 24rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.bg-opacity-50 {
    --tw-bg-opacity: 0.5;
}

.bg-opacity-75 {
    --tw-bg-opacity: 0.75;
}

/* Hover и Focus состояния */
.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.hover\:bg-gray-300:hover {
    background-color: #d1d5db;
}

.hover\:bg-red-700:hover {
    background-color: #b91c1c;
}

.hover\:border-gray-400:hover {
    border-color: #9ca3af;
}

.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus\:ring-1:focus {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-2:focus {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-blue-500:focus {
    --tw-ring-color: #3b82f6;
}

.focus\:ring-red-500:focus {
    --tw-ring-color: #ef4444;
}

.focus\:ring-gray-500:focus {
    --tw-ring-color: #6b7280;
}

.focus\:ring-offset-2:focus {
    --tw-ring-offset-width: 2px;
}

.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

/* Transition */
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Скрытие элементов */
.hidden {
    display: none;
}

.divide-y > * + * {
    border-top-width: 1px;
    border-color: #e5e7eb;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.leading-6 {
    line-height: 1.5rem;
}

/* Responsive */
@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .sm\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }
    
    .md\:hidden {
        display: none;
    }
}

@media (min-width: 1024px) {
    .lg\:block {
        display: block;
    }
    
    .lg\:hidden {
        display: none;
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Кастомные стили для компонентов */

/* Кнопки количества */
.quantity-btn {
    height: 2.5rem;
    width: 2.5rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.quantity-btn:first-child {
    border-radius: 0.375rem 0 0 0.375rem;
    border-right: none;
}

.quantity-btn:last-child {
    border-radius: 0 0.375rem 0.375rem 0;
    border-left: none;
}

.quantity-btn:hover {
    background-color: #f3f4f6;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-left: none;
    border-right: none;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    background-color: #ffffff;
    flex: 1;
    min-width: 0;
}

.quantity-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Календарь */
.calendar {
    width: 280px;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-nav {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 0.25rem;
    color: #6b7280;
}

.calendar-nav:hover {
    background: #e5e7eb;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
}

.calendar-day-header {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
}

.calendar-day {
    padding: 0.5rem;
    text-align: center;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.calendar-day:hover {
    background: #f3f4f6;
}

.calendar-day.selected {
    background: #2563eb;
    color: white;
}

.calendar-day.today {
    font-weight: 600;
    color: #2563eb;
}

.calendar-day.other-month {
    color: #d1d5db;
}

.calendar-day.disabled {
    color: #e5e7eb;
    cursor: not-allowed;
}

/* Список клиентов */
.client-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.15s ease-in-out;
}

.client-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.client-item.selected {
    background-color: #2563eb;
    color: white;
}

/* Toast уведомления */
.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 250px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background-color: #10b981;
    color: white;
}

.toast.error {
    background-color: #ef4444;
    color: white;
}

.toast.warning {
    background-color: #f59e0b;
    color: white;
}

.toast.info {
    background-color: #3b82f6;
    color: white;
}

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

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

/* Таблица */
.table-container {
    overflow-x: auto;
}

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

.table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.table td {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #374151;
}

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

/* Action кнопки */
.action-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn.edit {
    background-color: #3b82f6;
    color: white;
}

.action-btn.edit:hover {
    background-color: #2563eb;
}

.action-btn.delete {
    background-color: #ef4444;
    color: white;
}

.action-btn.delete:hover {
    background-color: #dc2626;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state svg {
    margin: 0 auto;
    color: #9ca3af;
}

.empty-state h3 {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.empty-state p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Popover */
.popover {
    position: absolute;
    z-index: 50;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.25rem;
    min-width: 200px;
}

.popover-content {
    max-height: 240px;
    overflow-y: auto;
}

/* Анимации */
.fade-in {
    animation: fadeIn 0.2s ease-out;
}

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

/* Кастомный скроллбар */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Статус соединения и кнопка обновления */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease-in-out;
}

.connection-status.online {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.connection-status.offline {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #6b7280;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.connection-status.online .status-dot {
    background-color: #22c55e;
}

.connection-status.offline .status-dot {
    background-color: #ef4444;
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.refresh-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.refresh-btn:active {
    background-color: #f3f4f6;
    transform: scale(0.98);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* Дополнительные утилиты */
.flex-wrap {
    flex-wrap: wrap;
}

.ml-2 {
    margin-left: 0.5rem;
}

/* Анимация вращения для кнопки обновления */
.refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

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