/* style.css - Premium Mobile-First UI Stylesheet (Corporate Light Theme) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-light: #0A66B5;
    --card-bg: #F99400;
    --card-border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --primary-color: #0A66B5; /* eManat Blue */
    --primary-glow: rgba(10, 102, 181, 0.15);
    
    /* Priorities */
    --priority-red: #ef4444;
    --priority-red-glow: rgba(239, 68, 68, 0.2);
    --priority-yellow: #F99400;
    --priority-yellow-glow: rgba(249, 148, 0, 0.2);
    --priority-green: #10b981;
    --priority-green-glow: rgba(16, 185, 129, 0.2);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Blobs (Soft Pastel Glow) */
body::before, body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}

body::before {
    background: var(--primary-color);
    top: -50px;
    left: -50px;
}

body::after {
    background: #F99400; /* eManat Orange */
    bottom: -50px;
    right: -50px;
}

/* App Container for Mobile Viewport */
.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Card Style (Light Premium Shadow) */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 30px 24px;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 1px 0 rgba(15, 23, 42, 0.1);
}

/* Login Page Styles */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: #ffffff;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #F99400, #E08200);
    border: 1px solid #FFAB24;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(249, 148, 0, 0.4);
    margin-top: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover, .btn-primary:active {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #FFAB24, #F99400);
    box-shadow: 0 6px 20px rgba(249, 148, 0, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-badge {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--priority-red);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
    font-weight: 500;
}

/* Workspace Dashboard Styles */
.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.user-info {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 12px 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04);
    width: 100%;
    margin-top: 5px;
    gap: 3px;
}

.user-welcome {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.user-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.user-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.btn-logout {
    background: #1b253b;
    border: 1px solid #384c75;
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #FF5A5A;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Section Titles */
.section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Destination List Items */
.destination-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.destination-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}


.destination-item:hover, .destination-item:active {
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* Priority Circle Indicators */
.priority-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition-smooth);
}


.priority-red {
    /* Rich conic gradient for urgent attention */
    background: conic-gradient(from 45deg, #ff3b30, #ff6f61, #ff3b30);
    /* Stronger outer glow and subtle inner glow */
    box-shadow: 0 0 30px rgba(255, 59, 48, 1), inset 0 0 8px rgba(255,255,255,0.2);
    /* Combined animations: fast pulse, subtle shake, and glowing pulse */
    animation: pulse-red 0.8s infinite ease-in-out, shake 1.5s infinite, glow-pulse 2s infinite;
    width: 16px;
    height: 16px;
}

.priority-yellow {
    background-color: var(--priority-yellow);
    box-shadow: 0 0 10px var(--priority-yellow-glow);
}

.priority-green {
    background-color: var(--priority-green);
    box-shadow: 0 0 10px var(--priority-green-glow);
}

.destination-details {
    flex-grow: 1;
}

.destination-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.destination-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chevron {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

/* Accordion Open State details */
.destination-item.open {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.destination-item.open .destination-desc {
    display: block;
    -webkit-line-clamp: unset;
    font-size: 0.85rem;
    line-height: 1.4;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border-left: 2px solid var(--primary-color);
    margin-top: 8px;
    width: 100%;
}

.destination-item.open .chevron {
    transform: rotate(90deg);
}

.destination-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    border-top: 1px solid var(--card-border);
    padding-top: 8px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(249, 148, 0, 0.08);
    color: var(--priority-yellow);
}

.status-completed {
    background: rgba(16, 185, 129, 0.08);
    color: var(--priority-green);
}

.status-processing {
    background: rgba(10, 102, 181, 0.08);
    color: var(--primary-color);
}

.status-viewed {
    background: rgba(6, 182, 212, 0.08);
    color: #06b6d4;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.status-cancelled {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.15));
    color: var(--text-primary, #ffffff);
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Demo badge */
.demo-badge {
    background: rgba(10, 102, 181, 0.08);
    border: 1px solid rgba(10, 102, 181, 0.15);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 59, 48, 0.9);
        transform: scale(1.05);
    }
    50% {
        opacity: 0.4;
        box-shadow: 0 0 5px rgba(255, 59, 48, 0.4);
        transform: scale(0.9);
    }
}

/* Additional subtle glowing pulse for red priority */
@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 59, 48, 0.6);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 59, 48, 1);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 59, 48, 0.6);
    }
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Admin Panel Specific Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.admin-tabs::-webkit-scrollbar {
    height: 4px;
}
.admin-tabs::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 2px;
}

.admin-tab-btn {
    padding: 8px 18px;
    background: #1b253b;
    border: 1px solid #384c75;
    border-radius: 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.admin-tab-btn:hover {
    background: #253352;
    border-color: #4a6399;
    color: white;
}

.admin-tab-btn.active {
    background: linear-gradient(135deg, #F99400, #E08200);
    border-color: #FFAB24;
    color: white;
    box-shadow: 0 4px 12px rgba(249, 148, 0, 0.35);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.admin-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.admin-card-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed var(--card-border);
}

.admin-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #384c75;
    background: #1b253b;
    color: #e2e8f0;
    transition: var(--transition-smooth);
}

.btn-sm:hover {
    background: #253352;
    border-color: #4a6399;
    color: white;
}

.btn-sm-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    color: #FF7878;
    font-weight: 700;
}

.btn-sm-danger:hover {
    background: #EF4444;
    color: white;
    border-color: #EF4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.btn-sm-primary {
    background: rgba(249, 148, 0, 0.2);
    border-color: rgba(249, 148, 0, 0.45);
    color: #FFAA2C;
    font-weight: 700;
}

.btn-sm-primary:hover {
    background: #F99400;
    color: white;
    border-color: #F99400;
    box-shadow: 0 0 10px rgba(249, 148, 0, 0.4);
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 25px;
    padding: 10px 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.pagination-buttons {
    display: flex;
    gap: 6px;
}

.log-console {
    background: #0f172a;
    color: #38bdf8;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    padding: 15px;
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    border: 1px solid #1e293b;
    margin-top: 15px;
}

/* Accordion details for Admin Cards */
.admin-card-details {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    border-top: 1px dashed var(--card-border);
    padding-top: 8px;
}

.admin-card.open .admin-card-details {
    display: flex;
}

.admin-card-header {
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-header-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.admin-card-header-badge-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.admin-card-chevron {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform var(--transition-smooth);
    margin-left: 4px;
}

.admin-card.open .admin-card-chevron {
    transform: rotate(180deg);
}

/* Rejection & Action Buttons styles */
.btn-action-start {
    margin: 0;
    padding: 10px 18px;
    font-size: 0.85rem;
    width: auto;
    background: linear-gradient(135deg, #F99400, #D07B00); /* Rich orange gradient */
    border: 1px solid #FFB23F;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 148, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.btn-action-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 148, 0, 0.5);
    background: linear-gradient(135deg, #FFB23F, #F99400);
}
.btn-action-start:active {
    transform: translateY(0);
}

.btn-action-reject {
    margin: 0;
    padding: 10px 18px;
    font-size: 0.85rem;
    width: auto;
    background: linear-gradient(135deg, #EF4444, #C53030); /* Rich red gradient */
    border: 1px solid #F87171;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.btn-action-reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #F87171, #EF4444);
}
.btn-action-reject:active {
    transform: translateY(0);
}

.btn-action-finish {
    margin: 0;
    padding: 10px 18px;
    font-size: 0.85rem;
    width: auto;
    background: linear-gradient(135deg, #10B981, #047857); /* Rich green gradient */
    border: 1px solid #34D399;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.btn-action-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #34D399, #10B981);
}

/* Nested Accordion Layout */
.accordion-item {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}
.accordion-header {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    outline: none;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.accordion-header:hover {
    background: rgba(255, 255, 255, 0.7);
}
.accordion-content {
    display: none;
    padding: 15px;
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.2);
}
.accordion-item.open > .accordion-content {
    display: block;
}
.accordion-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}
.accordion-item.open > .accordion-header .accordion-arrow {
    transform: rotate(90deg);
}

/* Subsection layouts inside accordions */
.accordion-subsection {
    margin-top: 15px;
    border-top: 1px dashed var(--card-border);
    padding-top: 12px;
}
.accordion-subsection:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}
.accordion-subsection-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-action-finish:active {
    transform: translateY(0);
}

/* Reorder controls inside active job cards */
.reorder-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: 12px;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-reorder-arrow {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 2px 6px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s, color 0.2s;
}

.btn-reorder-arrow:hover {
    color: var(--primary-hover);
    transform: scale(1.2);
}

.btn-reorder-arrow:active {
    transform: scale(0.95);
}

/* Report Table Styling */
.report-table th, .report-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--card-border);
}
.report-table tbody tr {
    transition: background-color 0.15s ease;
}
.report-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
}


