/* Modern CSS for Gxpress Application */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.nav-brand .subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Messages */
.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Markup Info */
.markup-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Forms */
.shipping-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.package-section {
    grid-column: 1 / -1;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title .icon {
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--card-bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Label Detail */
.label-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.address-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.address-box p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.pricing-box {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.pricing-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-item:last-child {
    border-bottom: none;
}

.pricing-item.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.pricing-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-value {
    color: var(--text-primary);
    font-weight: 600;
}

.tracking-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.label-actions {
    margin-top: 1rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.label-status {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-created {
    background: #d1fae5;
    color: #065f46;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.error-box {
    background: #fee2e2;
    border: 1px solid var(--error-color);
    color: #991b1b;
    padding: 1.5rem;
    border-radius: var(--radius);
}

.error-box h3 {
    color: #991b1b;
    border-bottom: 1px solid var(--error-color);
}

/* Table */
.labels-table {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.labels-table table {
    width: 100%;
    border-collapse: collapse;
}

.labels-table thead {
    background: var(--bg-color);
}

.labels-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.labels-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.labels-table tbody tr:hover {
    background: var(--bg-color);
}

.action-required-badge {
    display: inline-block;
    background-color: var(--warning-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.action-required-text {
    display: block;
    color: var(--warning-color);
    font-weight: 600;
    margin-top: 8px;
}

.history-entry.action-required {
    border-left: 3px solid var(--warning-color);
    padding-left: 12px;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.empty-state p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Authentication Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 500px;
    width: 100%;
    padding: 0 1rem;
}

.auth-messages .alert {
    margin-bottom: 0.5rem;
}

/* Authentication */
.auth-wrapper {
    width: 100%;
    max-width: 500px;
}

.auth-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.auth-logo-section {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-logo {
    height: 100px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.auth-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--card-bg);
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.auth-divider {
    margin: 2rem 0;
    text-align: center;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-secondary);
    position: relative;
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.admin-note {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius);
    text-align: center;
}

.admin-note-text {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.admin-note-text strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.auth-form .help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Brand Logo in Navbar */
.brand-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    height: 40px;
    width: auto;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text h1 {
    margin: 0;
    line-height: 1.2;
}

.brand-text .subtitle {
    font-size: 0.75rem;
    margin: 0;
}

.nav-user {
    color: var(--text-secondary);
    margin: 0 1rem;
    font-size: 0.875rem;
}

/* Default Address Notice */
.default-address-notice {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.default-address-notice.warning {
    background: #fef3c7;
    color: #92400e;
}

.default-address-notice .link {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

/* Address Validation */
.btn-validate {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    margin-left: auto;
    font-weight: 500;
}

.btn-validate:hover {
    background: #475569;
}

/* Rates Section */
.rates-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

.rates-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.rate-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
    cursor: pointer;
}

.rate-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.rate-card.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.rate-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.rate-days {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.rate-price {
    margin: 1rem 0;
}

.rate-base {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rate-final {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.settings-section h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.settings-form {
    margin-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.markup-display {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

/* Bulk Upload */
.upload-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.upload-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.upload-card h3 {
    margin-bottom: 1rem;
}

.csv-format {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    overflow-x: auto;
}

.csv-format code {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.csv-example {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.csv-example pre {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.info-box {
    background: #dbeafe;
    border: 1px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
}

.info-box h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-box ul {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* Bulk Review */
.bulk-actions {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.bulk-status {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    gap: 0.5rem;
}

.status-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-value {
    color: var(--text-primary);
    font-weight: 600;
}

.status-value.success {
    color: var(--success-color);
}

.status-value.error {
    color: var(--error-color);
}

.bulk-table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
}

.bulk-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    background: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
}

.bulk-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.bulk-table tbody tr:hover {
    background: var(--bg-color);
}

.row-status-error {
    background: #fee2e2;
}

.row-status-validated {
    background: #d1fae5;
}

.row-status-label_created {
    background: #dbeafe;
}

.error-text {
    color: var(--error-color);
    font-size: 0.875rem;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--warning-color);
}

.alert-warning .link {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .labels-table {
        overflow-x: auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .rates-container {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .bulk-status {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Unit Selector Styles */
.input-with-unit {
    display: flex;
    align-items: stretch;
}

.input-with-unit input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.unit-selector, .unit-display {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    background: var(--bg-color);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s;
}

.unit-selector:hover {
    background: #e2e8f0;
}

.unit-display {
    display: flex;
    align-items: center;
    min-width: 50px;
    justify-content: center;
    cursor: default;
}

/* Address Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.address-option {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
    background: var(--card-bg);
}

.address-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.address-option h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.address-option p {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.address-option .btn {
    margin-top: 12px;
}

/* Rate Card Enhancements */
.rate-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--card-bg);
}

.rate-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.rate-card.selected {
    border-color: var(--primary-color);
    background: #f0f7ff;
    box-shadow: var(--shadow-md);
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rate-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
}

.rate-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.base-rate {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.final-rate {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.rate-details {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.rate-details p {
    margin: 4px 0;
}

.markup-info {
    color: var(--success-color);
    font-weight: 500;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Download Button Styles */
.btn-download {
    background: var(--success-color);
    color: white;
}

.btn-download:hover {
    background: #059669;
}

/* Package Section */
.package-section {
    margin-top: 2rem;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .rate-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .rate-price {
        align-items: flex-start;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
}

