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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Header & Navigation */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 0;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

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

/* Nav Logo */
.nav-logo-link {
    margin-left: auto;
    padding: 4px !important;
    display: flex;
    align-items: center;
    background: none !important;
}
.nav-logo {
    height: 40px;       /* keep base size */
    transform: scale(2.4);  /* visually bigger */
    transform-origin: right center;
}

.nav-logo-link:hover {
    background: none !important;
}

.nav-logo {
    height: 36px;
    width: auto;
    border-radius: 6px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.9;
}

.nav-logo:hover {
    transform: scale(1.08);
    opacity: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card h2, .card h3 {
    margin-bottom: 16px;
    color: var(--text);
}

/* Forms */
.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
    text-decoration: none;
}

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

.btn-secondary {
    background: var(--text-muted);
}

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

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

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

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

.badge.gray { background: #e2e8f0; color: #475569; }
.badge.orange { background: #fed7aa; color: #9a3412; }
.badge.blue { background: #bfdbfe; color: #1e40af; }
.badge.green { background: #d1fae5; color: #065f46; }
.badge.red { background: #fecaca; color: #991b1b; }

.badge.CREATED { background: #e2e8f0; color: #475569; }
.badge.PICKED_UP { background: #fed7aa; color: #9a3412; }
.badge.IN_TRANSIT { background: #bfdbfe; color: #1e40af; }
.badge.DELIVERED { background: #d1fae5; color: #065f46; }
.badge.CANCELLED { background: #fecaca; color: #991b1b; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert.info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

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

.table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
}

.table tr:hover {
    background: var(--bg);
}

/* Courier List */
.courier-list {
    display: grid;
    gap: 12px;
}

.courier-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s;
}

.courier-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.courier-info h4 {
    margin-bottom: 4px;
    color: var(--text);
}

.courier-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0;
}

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

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 12px; }
    .nav { gap: 4px; }
    .nav a { padding: 6px 10px; font-size: 13px; }
    .form-grid.cols-2 { grid-template-columns: 1fr; }
    
    /* Prevent hover effects on touch devices */
    .courier-item:hover {
        box-shadow: none;
    }
    
    /* Ensure buttons are properly sized for touch */
    .courier-actions .btn {
        min-height: 44px;
        touch-action: manipulation;
    }
}
