/* GT Walsheim Font Faces */
@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/fonts/GTWalsheim-Light.woff2') format('woff2'),
        url('fonts/fonts/GTWalsheim-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/fonts/GTWalsheim-LightOblique.woff2') format('woff2'),
        url('fonts/fonts/GTWalsheim-LightOblique.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/fonts/GTWalsheim-Regular.woff2') format('woff2'),
        url('fonts/fonts/GTWalsheim-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/fonts/GTWalsheim-RegularOblique.woff2') format('woff2'),
        url('fonts/fonts/GTWalsheim-RegularOblique.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/fonts/GTWalsheim-Bold.woff2') format('woff2'),
        url('fonts/fonts/GTWalsheim-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/fonts/GTWalsheim-BoldOblique.woff2') format('woff2'),
        url('fonts/fonts/GTWalsheim-BoldOblique.woff') format('woff');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

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

body {
    font-family: 'GT Walsheim', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.28;
}

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 16px;
}

.main-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.left-sidebar {
    width: 30%;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.right-content {
    width: 70%;
    flex: 1;
}

header {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 24px;
    border-radius: 0 6.4px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2em;
    font-weight: 300; /* Light */
    margin-bottom: 16px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    justify-content: center;
    margin-top: 16px;
}

.tab-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 9.6px 19.2px;
    font-size: 12.8px;
    font-family: 'GT Walsheim', sans-serif;
    cursor: pointer;
    border-radius: 0;
    transition: background-color 0.2s;
    border-bottom: 3.2px solid transparent;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.3);
    border-bottom-color: white;
    font-weight: bold;
}

/* Maintenance Mode Toggle Button */
.maintenance-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 8px 12px;
    border-radius: 0 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.maintenance-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.maintenance-toggle.active {
    background: rgba(255, 193, 7, 0.3);
    border-color: #ffc107;
}

.maintenance-icon {
    display: inline-block;
}

/* Maintenance Banner */
.maintenance-banner {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: 0 6.4px;
    box-shadow: 0 3.2px 8px rgba(255, 152, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

.maintenance-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: bold;
    font-size: 16px;
}

.maintenance-banner-icon {
    font-size: 24px;
}

.maintenance-banner-text {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tab Content */
.tab-content {
    display: none !important;
}

.tab-content.active {
    display: block !important;
}

section {
    background: white;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 0 6.4px;
    box-shadow: 0 1.6px 3.2px rgba(0,0,0,0.1);
}

section h2 {
    color: #0066cc;
    margin-bottom: 16px;
    font-size: 1.2em;
    border-bottom: 1.6px solid #0066cc;
    padding-bottom: 8px;
}

.shipments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.shipments-header h2 {
    margin-bottom: 0;
    flex: 1;
    border-bottom: 1.6px solid #0066cc;
    padding-bottom: 8px;
}

/* Scanner Section */
.scanner-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#qrCodeInput,
#qrCodeInputIntern {
    flex: 1;
    padding: 9.6px;
    font-size: 12.8px;
    border: 1.6px solid #ddd;
    border-radius: 0 4px;
    transition: border-color 0.3s;
}

#qrCodeInput:focus,
#qrCodeInputIntern:focus {
    outline: none;
    border-color: #0066cc;
}

.qr-code-display {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 0 4px;
    margin-bottom: 16px;
    border-left: 3.2px solid #0066cc;
    font-size: 12px;
}

.qr-code-display strong {
    color: #0066cc;
}

/* Buttons */
.btn {
    padding: 9.6px 19.2px;
    border: none;
    border-radius: 0 4px;
    font-size: 12.8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: normal;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0052a3;
    transform: translateY(-1.6px);
    box-shadow: 0 3.2px 6.4px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-success {
    background-color: #add400;
    color: white;
    font-size: 14.4px;
    padding: 12px 32px;
    width: 100%;
}

.btn-success:hover:not(:disabled) {
    background-color: #9bc000;
    transform: translateY(-1.6px);
    box-shadow: 0 3.2px 6.4px rgba(173, 212, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Styles */
.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: normal;
    color: #555;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 0 4px;
    font-size: 11.2px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #0066cc;
}

.address-form {
    margin-top: 16px;
}

/* Sender Addressbook */
.sender-addressbook {
    margin-bottom: 16px;
}

#senderSelect {
    margin-top: 4px;
}

/* Shipments */
.shipments-list {
    margin-top: 16px;
}

.shipment-card {
    border: 1.6px solid #e0e0e0;
    border-radius: 0 6.4px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
    transition: all 0.3s;
}

.shipment-card:hover {
    border-color: #0066cc;
    box-shadow: 0 3.2px 6.4px rgba(0, 102, 204, 0.1);
}

.shipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    gap: 12px;
}

.shipment-title {
    font-size: 0.96em;
    font-weight: bold;
    color: #0066cc;
    flex: 1;
}

.shipment-selects {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-select {
    min-width: 112px;
    max-width: 144px;
    font-size: 0.72em;
    padding: 4.8px 8px;
    height: auto;
}

.header-select.carrier-select {
    min-width: 112px;
    max-width: 144px;
}

.header-select.product-select {
    min-width: 144px;
    max-width: 192px;
}

.address-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.address-fields .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.address-fields .form-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-fields .form-group-full {
    width: 100%;
}

.address-fields .form-group label {
    min-width: 96px;
    margin-bottom: 0;
    text-align: right;
}

.address-fields .form-group input {
    flex: 1;
}

.packages-section {
    margin-top: 16px;
}

.packages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.package-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9.6px;
    background: white;
    border-radius: 0 4px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.package-number {
    font-weight: bold;
    color: #0066cc;
    min-width: 64px;
    font-size: 12px;
}

.package-weight-input {
    flex: 1;
    max-width: 160px;
}

.package-weight-label {
    margin-left: 8px;
    color: #666;
    font-size: 12px;
}

.remove-package-btn {
    background-color: #ff0078;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 0 4px;
    cursor: pointer;
    font-size: 11.2px;
}

.remove-package-btn:hover {
    background-color: #e6006b;
}

.add-package-btn {
    background-color: #01b697;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px;
    cursor: pointer;
    margin-top: 8px;
}

.add-package-btn:hover {
    background-color: #019980;
}

/* Related Products Section (Global) */
.email-notification-section {
    background: white;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 0 6.4px;
    box-shadow: 0 1.6px 3.2px rgba(0,0,0,0.1);
}

.email-notification-section h2 {
    color: #0066cc;
    margin-bottom: 16px;
    font-size: 1.2em;
    border-bottom: 1.6px solid #0066cc;
    padding-bottom: 8px;
}

.email-list {
    margin-bottom: 12px;
}

.email-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.email-input {
    flex: 1;
}

.related-products-global-section {
    background: white;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 0 6.4px;
    box-shadow: 0 1.6px 3.2px rgba(0,0,0,0.1);
}

.related-products-global-section h2 {
    color: #0066cc;
    margin-bottom: 16px;
    font-size: 1.2em;
    border-bottom: 1.6px solid #0066cc;
    padding-bottom: 8px;
}

.related-products-global-list {
    margin-bottom: 12px;
}

.related-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9.6px;
    background: white;
    border-radius: 0 4px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.related-product-input {
    flex: 1;
    max-width: 240px;
}

.remove-product-btn {
    background-color: #ff0078;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 0 4px;
    cursor: pointer;
    font-size: 11.2px;
}

.remove-product-btn:hover {
    background-color: #e6006b;
}

.add-product-btn {
    background-color: #01b697;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px;
    cursor: pointer;
    margin-top: 8px;
}

.add-product-btn:hover {
    background-color: #019980;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 32px;
    font-style: italic;
}

/* Status Messages */
.status-message {
    margin-top: 12px;
    padding: 9.6px;
    border-radius: 0 4px;
    display: none;
    font-size: 12px;
}

.status-message.success {
    background-color: #e8f5d4;
    color: #5a6b00;
    border: 1px solid #add400;
    display: block;
}

.status-message.error {
    background-color: #ffe0ed;
    color: #cc005c;
    border: 1px solid #ff0078;
    display: block;
}

.status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 12% auto;
    padding: 24px;
    border-radius: 0 6.4px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 3.2px 16px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 16px;
    color: #0066cc;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* Submit Section */
.submit-section {
    text-align: center;
    padding: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .left-sidebar {
        width: 100%;
        position: relative;
        max-height: none;
    }
    
    .right-content {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .address-fields .form-row {
        grid-template-columns: 1fr;
    }
    
    .address-fields .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .address-fields .form-group label {
        min-width: auto;
        text-align: left;
        margin-bottom: 5px;
    }
    
    .scanner-input-group {
        flex-direction: column;
    }
    
    .shipment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .shipment-selects {
        width: 100%;
        flex-direction: column;
        gap: 6.4px;
    }
    
    .header-select {
        width: 100%;
        max-width: 100%;
    }
}

/* Intern Shipping Form */
.intern-shipping-form {
    background: white;
    padding: 16px;
    border-radius: 0 4px;
}

.calculation-result {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 0 4px;
    margin-top: 16px;
    border-left: 3.2px solid #0066cc;
}

.result-item {
    margin-bottom: 8px;
    font-size: 12px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item strong {
    color: #0066cc;
    margin-right: 8px;
}

.result-item span {
    font-weight: bold;
    color: #333;
}

/* Login Screen */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 0 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 32px;
    color: #333;
    font-size: 24px;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    color: #555;
    font-size: 12.8px;
}

.login-container .form-control {
    width: 100%;
    padding: 9.6px;
    font-size: 12.8px;
    border: 1.6px solid #ddd;
    border-radius: 0 4px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.login-container .form-control:focus {
    outline: none;
    border-color: #0066cc;
}

.login-container .btn-primary {
    width: 100%;
    padding: 12.8px;
    font-size: 12.8px;
}

.error-message {
    color: #dc3545;
    background: #f8d7da;
    padding: 9.6px;
    border-radius: 0 4px;
    margin-bottom: 16px;
    font-size: 12.8px;
    border-left: 3.2px solid #dc3545;
}


