/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1b4d3e 0%, #123524 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #123524 0%, #1b4d3e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
}

/* Notification Area */
.notification-area {
    margin: 20px 30px;
    padding: 15px 20px;
    border-radius: 5px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.notification-area.hidden {
    display: none;
}

.notification-area.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification-area.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Sections */
.form-section {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5rem;
}

.info-text {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95rem;
}

/* Form Rows and Groups */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.required {
    color: #dc3545;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.date-format-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Shipping Boxes Container */
.shipping-box {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.shipping-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.shipping-box-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}

.shipping-box-progress {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.vpk-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.vpk-input-wrapper {
    position: relative;
}

.vpk-input-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
}

.vpk-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.vpk-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vpk-input.filled {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.vpk-input.error {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.vpk-input.duplicate {
    border-color: #ffc107;
    border-width: 3px;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        border-color: #ffc107;
    }
    50% {
        border-color: #ff8800;
    }
}

.vpk-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.box-type-select:invalid {
  border-color: #dc3545;
}
.box-type-select {
  flex: 1;
  max-width: 300px;
  padding: 10px 12px;
  border: 2px solid #ced4da;
    border-top-color: rgb(206, 212, 218);
    border-right-color: rgb(206, 212, 218);
    border-bottom-color: rgb(206, 212, 218);
    border-left-color: rgb(206, 212, 218);
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .form-section {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .vpk-inputs-grid {
        grid-template-columns: 1fr;
    }

    .shipping-box-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 5px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .form-section {
        padding: 15px;
    }

    .notification-area {
        margin: 15px;
        padding: 12px 15px;
    }
}

/* Completion Page */
.completion-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 50px 30px !important;
}

.completion-content {
    text-align: center;
}

.completion-icon {
    font-size: 5rem;
    color: #28a745;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.completion-title {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 700;
}

.completion-message {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 30px;
    line-height: 1.6;
}

.completion-summary {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin: 30px auto;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.summary-item {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #667eea;
    margin-right: 10px;
    display: inline-block;
    min-width: 150px;
}

.completion-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .btn {
        display: none;
    }

    .notification-area {
        display: none;
    }
}
