body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Top Navbar Styles */
.top-navbar {
    background-color: #333;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.navbar-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-link:hover {
    color: #fff;
}

.home-link {
    font-size: 1.2em;
    color: #fff;
}

#username-display {
    color: cyan;
}

.desktop-links {
    display: flex;
    gap: 20px;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background-color: #444;
    padding: 10px 0;
}

.mobile-menu.open {
    display: block;
}

.mobile-link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-bottom: 1px solid #555;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    margin-top: 10px;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    background-color: #f1f1f1;
}

.dropdown.open .dropdown-menu {
    display: block;
}

/* Media Queries */
@media (max-width: 768px) {
    .desktop-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
}
/* Dropdown arrow rotation */
.dropdown.open .arrow {
    transform: rotate(180deg);
}
.arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.8em;
}

/* Ensure dropdown menu doesn't overflow for long emails */
.dropdown-menu {
    max-width: 250px;
    overflow-wrap: break-word;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
}

p span {
    font-weight: 600;
}

.environment-indicator {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #555;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.title-group {
    flex: 1;
}

.title-group h1 {
    text-align: left;
    margin-bottom: 5px;
}

.title-group .environment-indicator {
    text-align: left;
    margin-bottom: 0;
}

/* Global Config Panel */
.global-config-panel {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.global-config-panel summary {
    padding: 12px 15px;
    cursor: pointer;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    font-weight: normal;
    color: #555;
}

.config-summary-left {
    display: flex;
    align-items: center;
}

.settings-gear-icon {
    color: #666;
    transition: transform 0.3s ease;
}

.global-config-panel[open] .settings-gear-icon {
    transform: rotate(90deg);
}

.global-config-panel summary::-webkit-details-marker {
    display: none;
}

.config-status-preview {
    font-size: 0.85em;
    font-weight: normal;
    color: #666;
}

.config-content {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.ezeep-status-panel {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ezeep-status-panel .ezeep-status-indicator {
    text-align: left;
    margin-bottom: 5px;
}

.ezeep-status-panel .ezeep-printers-list {
    text-align: left;
    border-top: none;
    padding-top: 0;
}

.ezeep-status-panel .ezeep-printer-item {
    justify-content: flex-start;
}

.config-item {
    margin-bottom: 15px;
}

.config-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.config-item select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100%;
    max-width: 200px;
}

.config-help {
    font-size: 0.85em;
    color: #777;
    margin-top: 4px;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.config-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.ezeep-status-indicator {
    font-size: 0.9em;
    font-weight: normal;
    padding: 4px 10px;
    border-radius: 5px;
}

.ezeep-status-indicator.valid {
    background-color: transparent;
    color: #155724;
    border: none;
    padding: 0;
}

.ezeep-printers-list {
    margin-top: 10px;
    font-size: 0.9em;
    border-top: 1px solid #eee;
    padding-top: 5px;
    text-align: right;
}

.ezeep-printer-item {
    padding: 3px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ezeep-printer-item.configured-printer {
    font-weight: bold;
    color: #2e7d32;
}

.ezeep-printer-item .checkmark {
    color: #28a745;
}

.ezeep-status-indicator.invalid {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.authorize-button {
    background-color: #ffc107;
    color: #343a40;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.authorize-button:hover {
    background-color: #e0a800;
}

.order-list {
    display: grid;
    gap: 20px;
}

.order-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.order-item.fulfilled {
    border-color: #28a745; /* Green border for fulfilled */
    background-color: #e6ffe6; /* Light green background */
}

.order-item.fraud {
    border-color: #dc3545; /* Red border for fraud */
    background-color: #ffe6e6; /* Light red background */
}

.order-item.outOfScope {
    border: 3px solid yellow;
    background-color: lightgoldenrodyellow;
}

.order-item.outOfScope .parcel-item {
    background-color: lightcyan;
}

.order-item.customs {
    background-color: #b9e4ff;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.order-header h2 {
    margin: 0;
    color: #007bff;
    font-size: 1.4em;
}
.order-details p {
    margin: 5px 0;
    line-height: 1.5;
}
.order-details strong {
    color: #555;
}
.button-group {
    margin-top: 15px;
    text-align: right;
}

.button-group a {
    margin: 0 20px 0 0;
    background-color: #007bff;
    color: white;
    padding: 5px;
    border-radius: 5px;
    text-decoration: none;
}
.approve-button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}
.approve-button:hover:not(:disabled) {
    background-color: #0056b3;
}
.approve-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.pdf-links a {
    display: inline-block;
    margin-right: 10px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
.pdf-links a:hover {
    text-decoration: underline;
}
.notification-area {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}
.notification-area.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.notification-area.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}
.notification-area.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.parcel-details {
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}
.parcel-details h3 {
    margin-top: 0;
    color: #0056b3;
    font-size: 1.2em;
}
.parcel-item {
    background-color: #e9e9e9;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 8px;
}
.parcel-item p {
    margin: 3px 0;
    font-size: 0.9em;
}

/* Shipping Problem Toggle */
.shipping-problem-toggle-container {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align to the right */
    margin-top: 10px;
    margin-bottom: 10px;
}

.shipping-problem-label {
    margin-left: 10px;
    font-weight: normal;
    color: #555;
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3; /* Blue when checked */
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Activated state for the order item */
.order-item.shipping-problem-active {
    background-color: rgba(255, 255, 0, 0.3); /* Transparent 30% yellow */
}

/* Highlight for foreign countries */
.foreign-country-highlight {
    border: 2px solid orange;
    padding: 5px;
    border-radius: 5px;
    display: inline-block; /* To make border wrap content */
}
/* Support Description Styles */
.support-description-container {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.support-description-textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 8px;
    font-family: inherit;
}

.support-description-display {
    white-space: pre-wrap;
    font-family: inherit;
    background-color: #c4f9ff;
    padding: 10px;
    border-left: 4px solid #888;
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.5;
}

.save-support-description-btn {
    display: block;
    margin-left: auto;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    color: #666;
    vertical-align: middle;
    transition: color 0.2s;
    border-radius: 4px;
}

.copy-btn:hover {
    color: #000;
    background-color: #eee;
}

.copy-btn svg {
    display: block;
}

/* Ezeep Response Expandable Section */
.ezeep-toggle-btn {
    background: none;
    border: 1px solid #007bff;
    color: #007bff;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    margin-right: 10px;
    vertical-align: middle;
    transition: all 0.2s;
}

.ezeep-toggle-btn:hover {
    background-color: #e7f3ff;
}

.ezeep-response-container {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    font-size: 0.85em;
    overflow-x: auto;
    text-align: left;
}

.ezeep-response-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.ezeep-response-container pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #444;
}

/* Search Styles */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#order-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

#order-search-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px !important;
    min-width: 40px;
}

.icon-btn svg {
    display: block;
}


