:root {
    --primary-gradient-start: #2b58de;
    /* Approximate blue from image */
    --primary-gradient-end: #5b42f3;
    /* Approximate purple from image */
    --sidebar-width: 280px;
    --text-white: #ffffff;
    --text-muted: #e0e0e0;
    --hover-bg: rgba(255, 255, 255, 0.2);
    --active-bg: #3b82f6;
    /* Brighter blue for active state */
    --bg-light: #f3f4f6;
    --font-family: 'Inter', sans-serif;

    /* Row Colors */
    --row-purple: #f3e5f5;
    --row-yellow: #fff9c4;
    --row-green: #e8f5e9;
    --row-default: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ... existing body styles ... */

/* Action Bar & Table Styles */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-field {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
}

.search-field input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.search-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9e9e9e;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2b58de;
    color: white;
}

.btn-primary:hover {
    background-color: #1a45c7;
}

.btn-outline {
    background-color: white;
    border: 1px solid #e0e0e0;
    color: #333;
}

.btn-outline:hover {
    background-color: #f5f5f5;
}

/* Table Styling */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.wes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* Pagination Bar */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-left select {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-btn,
.page-nav {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #374151;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.page-btn:hover,
.page-nav:not(:disabled):hover {
    background-color: #f3f4f6;
    color: #111827;
}

.page-btn.active {
    background-color: #2563eb;
    color: white;
}

.page-nav:disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

#page-numbers {
    display: flex;
    gap: 2px;
}

.wes-ref-link {
    color: #2b58de;
    text-decoration: none;
    font-weight: 500;
}

.wes-ref-link:hover {
    text-decoration: underline;
}

.vessel-name {
    color: #d32f2f;
    /* Reddish color for vessel name per image */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Row Specifics based on image */
.row-purple {
    background-color: var(--row-purple);
}

.row-yellow {
    background-color: var(--row-yellow);
}

.row-green {
    background-color: var(--row-green);
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    /* More square look as per image */
    font-size: 0.7rem;
    /* Smaller font */
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    max-width: 120px;
    line-height: 1.2;
}

.badge-sent {
    background-color: #ede7f6;
    color: #5e35b1;
    border: 1px solid #d1c4e9;
}

/* Light Purple */
.badge-quoted {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Light Green */
.badge-closed {
    background-color: #eceff1;
    color: #455a64;
    border: 1px solid #cfd8dc;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background-color: #ffedd5;
    /* Light orange */
    color: #c2410c;
    /* Dark orange text */
}

.badge-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    display: inline-block;
}

.type-sales {
    background-color: #f3e8ff;
    /* Light purple */
    color: #7e22ce;
    /* Purple text */
}

.type-service {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: flex-end;
    /* Align to right */
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
    border-top: 1px solid #e5e7eb;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rows-per-page select {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: #111827;
    cursor: pointer;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    gap: 1rem;
}

.pagination-controls button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
}

.pagination-controls button:hover:not(:disabled) {
    color: #111827;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Action Button - Blue Square */
.action-btn {
    display: inline-flex;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    /* Centering fix */
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.edit-btn:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.delete-btn:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

/* Status Dropdown */
.status-cell {
    position: relative;
    cursor: pointer;
}

.status-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    min-width: 200px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 0.5rem 0;
    display: none;
    /* Hidden by default */
    max-height: 250px;
    overflow-y: auto;
}

.status-dropdown-menu.active {
    display: block;
}

.status-option {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #374151;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.status-option:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Scrollbar for dropdown */
.status-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.status-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.status-dropdown-menu::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    /* 2% from top */
    padding: 0;
    border: 1px solid #888;
    width: 600px;
    /* Max width */
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: black;
}

.modal-body {
    padding: 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
}

/* Form Styling */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #111827;
    background-color: #fff;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.disabled-input {
    background-color: #f9fafb !important;
    color: #6b7280 !important;
    cursor: not-allowed;
}

.helper-text {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    display: block;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.half-width {
    flex: 1;
}

.full-width {
    width: 100%;
}

/* Time Input Group */
.time-input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.time-input-group select {
    width: auto;
    min-width: 60px;
}

.ampm-toggle {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 0.5rem;
}

.ampm-toggle input[type="radio"] {
    display: none;
}

.ampm-toggle label {
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    cursor: pointer;
    margin: 0;
    font-size: 0.75rem;
    border-right: 1px solid #d1d5db;
}

.ampm-toggle label:last-child {
    border-right: none;
}

.ampm-toggle input:checked+label {
    background: #1e1b4b;
    /* Dark Blue */
    color: white;
}

/* Modal Footer */
.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: #333;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, handle inside app-container */
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 0 1.5rem 1rem 1.5rem;
}

.logo-container {
    margin-bottom: 1rem;
}

.logo {
    max-width: 100%;
    height: auto;
    /* Adjust logo display if needed */
    display: block;
}

/* Search Bar */
.search-container {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.search-box {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    transition: background 0.2s;
}

.search-box:hover,
.search-box:focus-within {
    background: rgba(255, 255, 255, 0.3);
}

.search-icon {
    color: var(--text-white);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 0.9rem;
    width: 100%;
    font-weight: 500;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 1rem;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.nav-item:hover {
    background-color: var(--hover-bg);
}

.nav-item.active {
    background-color: var(--active-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.nav-item i {
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 1.1rem;
}

.nav-group-header {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #e3f2fd;
    /* Lighter blue for headers */
    padding: 0.5rem 0;
    width: 100%;
}

.nav-group-header i {
    color: #90caf9;
}

.mt-auto {
    margin-top: auto;
}

.ml-auto {
    margin-left: auto;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.content-area {
    padding: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}