:root {
    --nm-red: #e30613;
    --nm-black: #000;
    --nm-light: #f5f7fa;
    --nm-gray: #6c757d;
    --nm-green: #2ecc71;
    --nm-danger: #c0392b;
    --nm-blue: #3498db;
    --nm-yellow: #f39c12;
    --nm-purple: #9b59b6;
    --nm-orange: #e67e22;
    --nm-cyan: #1abc9c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--nm-light);
    color: var(--nm-black);
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

.status-assigned {
    background: #fef9e7;
    color: #9c7c10;
}
.app-header {
    background: linear-gradient(135deg, var(--nm-black), var(--nm-red));
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--nm-red);
    background: white;
    padding: 5px;
    border-radius: 50%;
}

.driver-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.status-bar {
    font-size: .8rem;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--nm-green);
    color: #fff;
    margin-top: 3px;
    display: inline-block;
}

.header-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
    transition: transform 0.2s;
}

.header-btn:hover {
    transform: scale(1.1);
}

.app-content {
    padding: 20px;
    min-height: calc(100vh - 130px);
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,.08);
    border-left: 4px solid var(--nm-red);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-weight: 700;
    color: var(--nm-black);
    font-size: 1.3rem;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--nm-red);
    color: #fff;
}

.btn-primary:hover {
    background: #c10510;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(227, 6, 19, 0.3);
}

.btn-outline {
    border: 1px solid var(--nm-black);
    color: var(--nm-black);
    background: transparent;
}

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-success {
    background: var(--nm-green);
    color: #fff;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--nm-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #a93226;
}

.btn-warning {
    background: var(--nm-yellow);
    color: #fff;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-info {
    background: var(--nm-blue);
    color: #fff;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-cyan {
    background: var(--nm-cyan);
    color: #fff;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.action-buttons .btn {
    width: 100%;
}



.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    border-top: 4px solid var(--nm-red);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 5px 0;
    color: var(--nm-red);
}

.stat-label {
    font-size: .8rem;
    color: var(--nm-gray);
    font-weight: 600;
}

.order-status {
    font-size: .8rem;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 5px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-accepted {
    background: #d1ecf1;
    color: #0c5460;
}

.status-picked {
    background: #d4edda;
    color: #155724;
}

.status-delivered {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.order-item:hover {
    background: #f8f9fa;
}

.order-item:last-child {
    border-bottom: none;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-id {
    font-weight: 700;
    color: var(--nm-red);
    font-size: 1.1rem;
}

.order-details {
    margin: 10px 0;
}

.order-detail-row {
    display: flex;
    margin-bottom: 5px;
}

.order-detail-label {
    font-weight: 600;
    width: 120px;
    color: var(--nm-gray);
}

.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.order-actions .btn {
    flex: 1 1 140px;
    padding: 10px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}


.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-weight: 600;
}

.tab.active {
    border-bottom-color: var(--nm-red);
    color: var(--nm-red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--nm-blue);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.signature-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border: 1px dashed #ddd;
    border-radius: 5px;
    background: #f8f9fa;
}

.signature-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.signature-actions .btn {
    flex: 1;
}

.app-footer {
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #ddd;
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--nm-gray);
    background: none;
    border: none;
    cursor: pointer;
    font-size: .8rem;
    transition: all 0.2s;
    padding: 5px 10px;
    border-radius: 8px;
    text-decoration: none;
}

.nav-btn i {
    font-size: 1.3rem;
}

.nav-btn.active {
    color: var(--nm-red);
    background: rgba(227, 6, 19, 0.1);
}

.nav-btn:hover {
    color: var(--nm-red);
    transform: translateY(-2px);
}

footer {
    text-align: center;
    font-size: .8rem;
    color: var(--nm-gray);
    padding: 15px 5px;
    background: #fff;
    border-top: 1px solid #eee;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--nm-red);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn-container {
    position: relative;
}

.search-box {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    width: 100%;
    font-size: 1rem;
}

.filter-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.filter-btn.active {
    background: var(--nm-red);
    color: white;
    border-color: var(--nm-red);
}

.filter-btn:hover {
    background: #f8f9fa;
}

.filter-btn.active:hover {
    background: #c10510;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--nm-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state p {
    font-size: 1.1rem;
}

.order-timeline {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.timeline-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 0.9rem;
    color: var(--nm-gray);
}

.timeline-icon.active {
    background: var(--nm-green);
    color: white;
}

.timeline-content {
    flex: 1;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--nm-gray);
}

.map-container {
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nm-gray);
    border: 1px solid #ddd;
}

.finance-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.finance-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    border-top: 4px solid var(--nm-cyan);
}

.finance-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 5px 0;
    color: var(--nm-cyan);
}

.finance-label {
    font-size: .8rem;
    color: var(--nm-gray);
    font-weight: 600;
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.attendance-day {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,.05);
}

.day-present {
    background: var(--nm-green);
    color: white;
}

.day-absent {
    background: var(--nm-danger);
    color: white;
}

.day-off {
    background: #f8f9fa;
    color: var(--nm-gray);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--nm-cyan);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    font-size: 1.3rem;
}

.profile-details {
    font-size: 0.9rem;
    color: var(--nm-gray);
    margin-top: 5px;
}

.profile-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.rating-stars {
    color: var(--nm-yellow);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.profile-stat {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,.05);
}

.profile-stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 5px 0;
    color: var(--nm-red);
}

.profile-stat-label {
    font-size: .7rem;
    color: var(--nm-gray);
    font-weight: 600;
}

.status-toggle {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.status-toggle-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    color: inherit;
}

.status-toggle-btn.active {
    background: var(--nm-green);
    color: white;
    border-color: var(--nm-green);
}

.status-toggle-btn.inactive {
    background: var(--nm-danger);
    color: white;
    border-color: var(--nm-danger);
}

.chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nm-cyan);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 600;
}

.chat-status {
    font-size: 0.8rem;
    color: var(--nm-gray);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.message-sent {
    align-self: flex-end;
    background: var(--nm-blue);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-received {
    align-self: flex-start;
    background: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.7;
    text-align: right;
}

.message-received .message-time {
    text-align: left;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #eee;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--nm-blue);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quick-actions {
    display: flex;
    gap: 10px;
    padding: 0 15px 15px;
}

.quick-action-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-action-btn:hover {
    background: #f8f9fa;
}

.support-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.support-option {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    cursor: pointer;
    transition: all 0.2s;
}

.support-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.support-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--nm-red);
}

.support-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.support-desc {
    font-size: 0.8rem;
    color: var(--nm-gray);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-weight: 700;
    color: var(--nm-black);
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--nm-gray);
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .finance-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .support-options {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}
/* ===============================
   FORCE RESPONSIVE ACTION BUTTONS
   (Dashboard Only)
================================ */
.card .action-buttons {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.card .action-buttons .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 14px 12px;
}

/* ===============================
   MOBILE OVERRIDE (STACK BUTTONS)
================================ */
@media (max-width: 768px) {

    .card .action-buttons {
        grid-template-columns: 1fr !important;
    }

    .card .action-buttons .btn {
        font-size: 0.9rem;
    }
}

/* ===============================
   SMALL PHONES (EXTRA SAFETY)
================================ */
@media (max-width: 480px) {

    .card .action-buttons {
        gap: 10px;
    }

    .card .action-buttons .btn i {
        font-size: 1rem;
    }
}


