/* Declaration Styles */
.declaration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.declaration-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.75rem;
}

.declaration-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.last-updated {
    color: #6c757d;
    font-size: 0.875rem;
}

.declaration-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
}

.declaration-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.info-item span {
    color: #2c3e50;
    font-size: 1rem;
}

/* Conditions List */
.conditions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.condition-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.condition-item:hover {
    background-color: #e9ecef;
}

.condition-item.condition-pending {
    border-left-color: #ffc107;
}

.condition-item.condition-pending .condition-icon {
    color: #ffc107;
}

.condition-icon {
    color: #28a745;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.condition-content {
    flex: 1;
}

.condition-content h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.condition-content p {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    line-height: 1.5;
}

.verification-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.verified-badge {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.verification-badge.pending {
    background-color: #ffc107;
    color: #212529;
}

.verification-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.country-selection {
    margin: 0.5rem 0;
}

.country-selection label {
    font-weight: 600;
    margin-right: 0.5rem;
    color: #495057;
}

.form-select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    min-width: 200px;
}

/* Commodities Grid */
.commodities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.commodity-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.commodity-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.commodity-item i {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 0.75rem;
}

.commodity-item span {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.commodity-item small {
    color: #6c757d;
    font-size: 0.75rem;
}

.hs-codes h5 {
    margin-bottom: 0.75rem;
    color: #495057;
    font-size: 1rem;
}

.hs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hs-tag {
    background-color: #e9ecef;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Signature Section */
.signature-display {
    text-align: center;
}

.signature-preview {
    margin-bottom: 1.5rem;
    padding: 2rem;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.signature-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.signature-image-placeholder i {
    font-size: 3rem;
    color: #6c757d;
}

.signature-image-placeholder span {
    color: #495057;
    font-weight: 600;
}

.signature-info {
    text-align: left;
}

.signature-info h5 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.signature-info p {
    margin: 0.5rem 0;
    color: #6c757d;
}

/* Signature Upload */
.signature-upload {
    text-align: center;
}

.upload-instructions {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.upload-instructions i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-instructions h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.upload-instructions p {
    color: #6c757d;
    margin: 0;
}

.signature-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.file-upload-area:hover {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.file-upload-area i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.file-upload-area p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #495057;
}

.file-upload-area span {
    color: #6c757d;
    font-size: 0.875rem;
}

.file-input {
    display: none;
}

.file-preview {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-info i {
    font-size: 1.5rem;
    color: #dc3545;
}

.file-info div {
    flex: 1;
}

.file-info strong {
    display: block;
    color: #2c3e50;
}

.file-info div div {
    color: #6c757d;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline:hover {
    background-color: #6c757d;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Declaration Actions */
.declaration-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Declaration Footer */
.declaration-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 2px solid #e9ecef;
    margin-top: 2rem;
}

.declaration-stamp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-weight: 600;
}

.declaration-stamp i {
    font-size: 1.25rem;
}

.declaration-id {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Regulation Panel Styles */
.regulation-panel {
    position: fixed;
    right: -400px;
    top: 0;
    height: 100vh;
    width: 400px;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.regulation-panel.active {
    right: 0;
}

.regulation-handle {
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    background: #007bff;
    color: white;
    padding: 1rem 0.5rem;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.regulation-handle:hover {
    background: #0056b3;
}

.regulation-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.regulation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.regulation-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.regulation-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.regulation-article {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.regulation-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.regulation-article h4 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.regulation-article p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.regulation-conditions {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.regulation-conditions li {
    padding: 0.5rem 0;
    color: #495057;
    border-bottom: 1px solid #f8f9fa;
}

.regulation-conditions li:last-child {
    border-bottom: none;
}

.regulation-conditions strong {
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .declaration-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .commodities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .declaration-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .declaration-actions {
        flex-direction: column;
    }
    
    .regulation-panel {
        width: 100%;
        right: -100%;
    }
    
    .signature-preview {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .signature-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .commodities-grid {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .condition-item {
        flex-direction: column;
        gap: 0.75rem;
    }
}