/* Responsive CSS for Kurir Application */
/* Mobile First Approach */

/* Base Styles */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

/* Mobile First - Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Container */
.container {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
    }

    .btn {
        padding: 0.875rem 1.5rem;
    }
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.header-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

/* Navigation */
.nav {
    display: none;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    border-bottom: 1px solid #e5e7eb;
}

.nav-link {
    display: block;
    padding: 1rem;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #f9fafb;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.card-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1rem;
}

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

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

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

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

/* Flexbox - Core utilities moved to base-shared.css */
/* Keeping only extended flexbox utilities */
.justify-around {
    justify-content: space-around;
}

.gap-6 {
    gap: 1.5rem;
}

/* Spacing - Core utilities moved to base-shared.css */
/* Keeping only extended spacing values */
.m-6 {
    margin: 1.5rem;
}

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

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

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

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

.p-1 {
    padding: 0.25rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

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

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

/* Text - Utility classes moved to base-shared.css */
/* Keeping only color-specific utilities */
.text-gray-500 {
    color: #6b7280;
}

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

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

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

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

.text-primary {
    color: var(--primary-color);
}

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

.text-warning {
    color: var(--warning-color);
}

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

/* Background */
.bg-white {
    background-color: white;
}

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

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

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

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

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

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

/* Border - Core styles moved to base-shared.css */
/* Keeping only extended border utilities */
.border-l {
    border-left: 1px solid #e5e7eb;
}

.border-r {
    border-right: 1px solid #e5e7eb;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

/* Shadow - Moved to base-shared.css */

/* Display, Position, Width, Height - Moved to base-shared.css */

/* Min/Max */
.min-h-screen {
    min-height: 100vh;
}

/* Animation */
/* Animation utilities moved to base-shared.css */

/* Status Indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-assigned {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.status-on_delivery {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: white;
}

.status-delivered {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
}

.status-cancelled {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
}

/* Mobile Specific */
@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }

    .header-title {
        font-size: 1.125rem;
    }

    .header-subtitle {
        font-size: 0.75rem;
    }

    .card {
        padding: 0.75rem;
    }

    .card-header {
        margin-bottom: 0.75rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-icon {
        width: 2rem;
        height: 2rem;
        margin-right: 0.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

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

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

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

    .gap-4 {
        gap: 0.75rem;
    }

    .gap-6 {
        gap: 1rem;
    }
}

/* Tablet Styles */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        max-width: 1024px;
        padding: 0 1rem;
    }

    .nav {
        display: block;
    }

    .nav-toggle {
        display: none;
    }

    .nav-list {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        border-bottom: none;
    }

    .nav-link {
        padding: 0.5rem 1rem;
    }

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

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

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

/* Desktop Styles */
@media (min-width: 1025px) {
    .container {
        max-width: 1280px;
        padding: 0 1.5rem;
    }

    .nav {
        display: block;
    }

    .nav-toggle {
        display: none;
    }

    .nav-list {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        border-bottom: none;
    }

    .nav-link {
        padding: 0.75rem 1.5rem;
    }

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

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

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

    .header-content {
        max-width: 1280px;
        margin: 0 auto;
    }

    .card {
        padding: 1.5rem;
    }

    .card-header {
        margin-bottom: 1.25rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-icon {
        width: 3rem;
        height: 3rem;
        margin-right: 1rem;
    }
}

/* Large Desktop */
@media (min-width: 1281px) {
    .container {
        max-width: 1536px;
    }
}

/* Print Styles */
@media print {

    .nav,
    .btn,
    .header {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    body {
        background: white;
        color: black;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }

    .btn {
        border: 2px solid currentColor;
    }

    .form-input,
    .form-select,
    .form-textarea {
        border: 2px solid var(--dark-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1f2937;
        --dark-color: #f3f4f6;
    }

    body {
        background-color: var(--light-color);
        color: var(--dark-color);
    }

    .card {
        background: #374151;
        color: var(--dark-color);
    }

    .table {
        background: #374151;
        color: var(--dark-color);
    }

    .table th {
        background: #4b5563;
        color: var(--dark-color);
    }

    .form-input,
    .form-select,
    .form-textarea {
        background: #374151;
        color: var(--dark-color);
        border-color: #4b5563;
    }
}