/* CSS Variables for consistent theming */
:root {
    --csm-primary: #00a7b4;
    --csm-primary-dark: #005177;
    --csm-secondary: #26659b;
    --csm-accent: #ff6b35;
    --csm-light: #f8fafc;
    --csm-white: #ffffff;
    --csm-gray-100: #f7fafc;
    --csm-gray-200: #edf2f7;
    --csm-gray-300: #e2e8f0;
    --csm-gray-500: #a0aec0;
    --csm-gray-700: #4a5568;
    --csm-gray-900: #1a202c;
    --csm-success: #48bb78;
    --csm-warning: #ed8936;
    --csm-error: #f56565;
    --csm-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --csm-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --csm-border-radius: 12px;
    --csm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Loading Animation */
@keyframes csm-spin {
    to { transform: rotate(360deg); }
}

@keyframes csm-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes csm-slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes csm-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Minimal icon style (emojis removed for professional look) */
.csm-icon,
.csm-icon::before,
.csm-icon-truck::before,
.csm-icon-package::before,
.csm-icon-tracking::before,
.csm-icon-location::before,
.csm-icon-edit::before,
.csm-icon-invoice::before {
    display: none !important;
    content: none !important;
}

/* Main Container Styles */
.csm-request-form-container, 
.csm-tracking-container, 
.csm-edit-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: var(--csm-border-radius);
    box-shadow: var(--csm-shadow);
    background-color: var(--csm-white);
    border: 1px solid var(--csm-gray-200);
    position: relative;
    overflow: hidden;
    animation: csm-fadeInUp 0.6s ease-out;
}

.csm-request-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--csm-primary);
    border-radius: var(--csm-border-radius) var(--csm-border-radius) 0 0;
}

/* Modern Typography */
.csm-container h1,
.csm-container h2,
.csm-container h3,
.csm-container h4 {
    color: var(--csm-gray-900);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.csm-container h1 {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.csm-container h2 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.csm-container h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.csm-container h4 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    color: var(--csm-primary);
}

/* Form Sections */
.csm-form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--csm-gray-100);
    border: 1px solid var(--csm-gray-200);
    border-radius: var(--csm-border-radius);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateX(-30px) scale(0.98);
    animation: csm-formSectionSlideIn 0.8s ease-out forwards;
}

.csm-form-section:nth-child(2) { animation-delay: 0.1s; }
.csm-form-section:nth-child(3) { animation-delay: 0.2s; }
.csm-form-section:nth-child(4) { animation-delay: 0.3s; }
.csm-form-section:nth-child(5) { animation-delay: 0.4s; }
.csm-form-section:nth-child(6) { animation-delay: 0.5s; }

.csm-form-section:hover {
    box-shadow: 0 8px 25px rgba(0, 167, 180, 0.1);
    transform: translateY(-3px) scale(1.01);
    border-color: var(--csm-primary);
}

@keyframes csm-formSectionSlideIn {
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.csm-form-section h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--csm-primary);
    display: inline-block;
}

/* Form Groups */
.csm-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.csm-form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--csm-gray-700);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Inputs */
.csm-form-group input[type="text"],
.csm-form-group input[type="tel"],
.csm-form-group input[type="email"],
.csm-form-group input[type="number"],
.csm-form-group select,
.csm-form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--csm-gray-300);
    border-radius: var(--csm-border-radius);
    font-size: 1rem;
    background: var(--csm-white);
    transition: var(--csm-transition);
    box-sizing: border-box;
    position: relative;
}

.csm-form-group input:focus,
.csm-form-group select:focus,
.csm-form-group textarea:focus {
    outline: none;
    border-color: var(--csm-primary);
    box-shadow: 0 0 0 3px rgba(0, 167, 180, 0.1);
    transform: translateY(-1px);
}

.csm-form-group input:hover,
.csm-form-group select:hover,
.csm-form-group textarea:hover {
    border-color: var(--csm-gray-500);
}

.csm-form-group input[readonly],
.csm-form-group input[disabled] {
    background: var(--csm-gray-100);
    color: var(--csm-gray-500);
    cursor: not-allowed;
}

.csm-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Modern Button Styles */
.csm-btn,
.csm-submit-btn,
.track-button,
#csm-add-shipment,
.csm-edit-btn,
.csm-invoice-link,
.csm-waybill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--csm-border-radius);
    cursor: pointer;
    transition: var(--csm-transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
}

/* Primary Button */
.csm-btn-primary,
.csm-submit-btn,
.track-button,
#csm-add-shipment {
    background: var(--csm-primary);
    color: var(--csm-white);
    box-shadow: 0 2px 8px rgba(0, 167, 180, 0.18);
}

.csm-btn-primary:hover,
.csm-submit-btn:hover,
.track-button:hover,
#csm-add-shipment:hover {
    background: var(--csm-primary-dark);
    box-shadow: 0 8px 20px rgba(0, 81, 119, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.csm-btn-primary:active,
.csm-submit-btn:active,
.track-button:active,
#csm-add-shipment:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 81, 119, 0.25);
    transition-duration: 0.1s;
}

.csm-btn-primary,
.csm-submit-btn,
.track-button,
#csm-add-shipment {
    position: relative;
    overflow: hidden;
}

.csm-btn-primary::after,
.csm-submit-btn::after,
.track-button::after,
#csm-add-shipment::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
}

.csm-btn-primary:hover::after,
.csm-submit-btn:hover::after,
.track-button:hover::after,
#csm-add-shipment:hover::after {
    width: 300px;
    height: 300px;
}

/* Secondary Button */
.csm-btn-secondary,
.csm-edit-btn {
    background: var(--csm-gray-900);
    color: var(--csm-white);
    box-shadow: 0 2px 8px rgba(26, 32, 44, 0.2);
}

.csm-btn-secondary:hover,
.csm-edit-btn:hover {
    background: #111827;
    box-shadow: 0 4px 12px rgba(26, 32, 44, 0.25);
    transform: translateY(-1px);
}

/* Success Button */
.csm-btn-success {
    background: var(--csm-success);
    color: var(--csm-white);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.2);
}

.csm-btn-success:hover {
    background: #2f855a;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.25);
    transform: translateY(-1px);
}

/* Outline Button */
.csm-btn-outline {
    background: transparent;
    border: 2px solid var(--csm-primary);
    color: var(--csm-primary);
}

.csm-btn-outline:hover {
    background: var(--csm-primary);
    color: var(--csm-white);
    box-shadow: 0 4px 15px rgba(0, 167, 180, 0.3);
    transform: translateY(-2px);
}

/* Button Loading State */
.csm-btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.csm-btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: csm-spin 1s linear infinite;
    right: 1rem;
}

/* Remove Button */
.csm-remove-shipment {
    background: linear-gradient(135deg, var(--csm-error), #e53e3e);
    color: var(--csm-white);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: auto;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.csm-remove-shipment:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: scale(1.05);
}

/* Alert Styles */
.csm-alert {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--csm-border-radius);
    border-left: 5px solid;
    font-weight: 500;
    animation: csm-fadeInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.csm-alert::before { display: none; }

.csm-alert.success {
    background: #f0fff4;
    border-left-color: var(--csm-success);
    color: #22543d;
}

.csm-alert.error {
    background: #fff5f5;
    border-left-color: var(--csm-error);
    color: #742a2a;
}

.csm-alert.warning {
    background: #fffbeb;
    border-left-color: var(--csm-warning);
    color: #7b341e;
}

/* Tracking Results */
.csm-tracking-results {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--csm-white);
    border-radius: var(--csm-border-radius);
    box-shadow: var(--csm-shadow);
    border: 1px solid var(--csm-gray-200);
    animation: csm-fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.csm-tracking-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--csm-success), var(--csm-primary));
}

.csm-tracking-results h3 {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--csm-primary);
}

.csm-tracking-details {
    display: grid;
    gap: 1rem;
}

.csm-tracking-details p {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--csm-gray-100);
    border-radius: var(--csm-border-radius);
    border-left: 4px solid var(--csm-primary);
    margin: 0;
    transition: var(--csm-transition);
}

.csm-tracking-details p:hover {
    background: var(--csm-gray-200);
    transform: translateX(5px);
}

.csm-tracking-details strong {
    color: var(--csm-gray-900);
    margin-right: 0.5rem;
    min-width: 150px;
}

/* Status Badges */
.status-pending,
.status-processing,
.status-in-transit,
.status-delivered,
.status-cancelled {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
}

.status-pending { background: #FEF3C7; color: #92400E; }
.status-processing { background: #CCFBF1; color: #134E4A; }
.status-in-transit { background: #DBEAFE; color: #1E3A8A; }
.status-delivered { background: #D1FAE5; color: #065F46; }
.status-cancelled { background: #FEE2E2; color: #7F1D1D; }

/* Status History */
.csm-status-history {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    position: relative;
}

.csm-status-history::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--csm-primary), var(--csm-secondary));
}

.csm-status-history li {
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1rem;
    background: var(--csm-white);
    border-radius: var(--csm-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: csm-slideInFromLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.csm-status-history li:nth-child(1) { animation-delay: 0.1s; }
.csm-status-history li:nth-child(2) { animation-delay: 0.2s; }
.csm-status-history li:nth-child(3) { animation-delay: 0.3s; }
.csm-status-history li:nth-child(4) { animation-delay: 0.4s; }

.csm-status-history li::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--csm-primary);
    border-radius: 50%;
    border: 3px solid var(--csm-white);
    box-shadow: 0 0 0 3px var(--csm-primary);
}

.csm-status-history li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Enhanced Tracking UI Elements */
.csm-tracking-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: var(--csm-gray-100);
    border-radius: var(--csm-border-radius);
    border: 1px solid var(--csm-gray-200);
}

.csm-tracking-subtitle {
    font-size: 1.1rem;
    color: var(--csm-gray-700);
    margin: 1rem 0 0 0;
    opacity: 0.9;
}

.csm-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.csm-form-actions {
    text-align: center;
    margin-top: 2rem;
}

/* Tracking Features Section */
.csm-tracking-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--csm-gray-200);
}

.csm-feature {
    text-align: center;
    padding: 2rem;
    background: var(--csm-white);
    border-radius: var(--csm-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--csm-gray-200);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(40px);
    animation: csm-featureSlideUp 0.8s ease-out forwards;
}

.csm-feature:nth-child(1) { animation-delay: 0.2s; }
.csm-feature:nth-child(2) { animation-delay: 0.4s; }
.csm-feature:nth-child(3) { animation-delay: 0.6s; }

.csm-feature:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 167, 180, 0.15);
    border-color: var(--csm-primary);
}

@keyframes csm-featureSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature icons removed for minimal design */

.csm-feature h4 {
    color: var(--csm-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.csm-feature p {
    color: var(--csm-gray-600);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Results Header */
.csm-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--csm-gray-200);
}

.csm-status-badge-container {
    animation: csm-pulse 2s infinite;
}

/* Detail Cards */
.csm-detail-card {
    padding: 1.5rem;
    background: var(--csm-white);
    border-radius: var(--csm-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--csm-primary);
    margin-bottom: 1rem;
    transition: var(--csm-transition);
    animation: csm-slideInFromLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.csm-detail-card:nth-child(1) { animation-delay: 0.1s; }
.csm-detail-card:nth-child(2) { animation-delay: 0.2s; }
.csm-detail-card:nth-child(3) { animation-delay: 0.3s; }
.csm-detail-card:nth-child(4) { animation-delay: 0.4s; }

.csm-detail-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-left-color: var(--csm-primary-dark);
}

.csm-detail-content {
    display: flex;
    flex-direction: column;
}

.csm-detail-content strong {
    color: var(--csm-gray-900);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.csm-detail-content span {
    color: var(--csm-gray-700);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Status History Container */
.csm-status-history-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--csm-gray-200);
}

.csm-history-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.csm-history-date {
    color: var(--csm-gray-500);
    font-size: 0.9rem;
    font-weight: normal !important;
}

/* Tracking Actions */
.csm-tracking-actions {
    margin-top: 2rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--csm-gray-200);
}

/* Hero Section */
.csm-hero {
    background: #00a7b4;
    color: var(--csm-white);
    padding: 4rem 2rem;
    margin: -2rem -2rem 3rem -2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.csm-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: csm-heroFadeInUp 0.8s ease-out 0.3s forwards;
}

.csm-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--csm-white);
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: csm-heroFadeInUp 0.8s ease-out 0.5s forwards;
}

.csm-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0;
    line-height: 1.6;
    transform: translateY(20px);
    animation: csm-heroFadeInUp 0.8s ease-out 0.7s forwards;
}

.csm-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.csm-hero-stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--csm-border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: var(--csm-transition);
    animation: csm-heroStatFadeIn 0.8s ease-out forwards;
}

.csm-hero-stat:nth-child(1) { animation-delay: 0.9s; }
.csm-hero-stat:nth-child(2) { animation-delay: 1.1s; }
.csm-hero-stat:nth-child(3) { animation-delay: 1.3s; }

.csm-hero-stat:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.csm-hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--csm-white);
    opacity: 0;
    transform: scale(0.8);
    animation: csm-numberScale 0.8s ease-out 0.3s forwards;
}

.csm-hero-stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(10px);
    animation: csm-labelFadeIn 0.8s ease-out 0.5s forwards;
}

/* Hero Animations */
@keyframes csm-heroFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes csm-heroStatFadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes csm-numberScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    60% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes csm-labelFadeIn {
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Hero responsive */
@media (max-width: 768px) {
    .csm-hero {
        padding: 2rem 1rem;
    }
    
    .csm-hero h1 {
        font-size: 2rem;
    }
    
    .csm-hero p {
        font-size: 1rem;
    }
    
    .csm-hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Shipment Form */
.csm-shipment-form {
    background: var(--csm-white);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid var(--csm-gray-200);
    border-radius: var(--csm-border-radius);
    box-shadow: var(--csm-shadow);
    position: relative;
    transition: var(--csm-transition);
    animation: csm-fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.csm-shipment-form:nth-child(2) { animation-delay: 0.1s; }
.csm-shipment-form:nth-child(3) { animation-delay: 0.2s; }
.csm-shipment-form:nth-child(4) { animation-delay: 0.3s; }

.csm-shipment-form:hover {
    border-color: var(--csm-primary);
    box-shadow: var(--csm-shadow-lg);
    transform: translateY(-3px);
}

.csm-shipment-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--csm-primary);
    border-radius: var(--csm-border-radius) var(--csm-border-radius) 0 0;
}

.csm-shipment-form h3 {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--csm-gray-200);
    color: var(--csm-primary);
}

/* Shipments Container */
#csm-shipments-container {
    margin-bottom: 2rem;
}

/* Add Shipment Button Container */
.csm-add-shipment-container {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    border: 2px dashed var(--csm-gray-300);
    border-radius: var(--csm-border-radius);
    background: var(--csm-gray-100);
    transition: var(--csm-transition);
}

.csm-add-shipment-container:hover {
    border-color: var(--csm-primary);
    background: #f4f8fa;
}

#csm-add-shipment {
    margin: 0;
}

/* Flex containers */
.csm-tracking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Field Validation States */
.csm-form-group input.csm-field-valid,
.csm-form-group select.csm-field-valid,
.csm-form-group textarea.csm-field-valid {
    border-color: var(--csm-success);
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.csm-form-group input.csm-field-invalid,
.csm-form-group select.csm-field-invalid,
.csm-form-group textarea.csm-field-invalid {
    border-color: var(--csm-error);
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
    animation: csm-shake 0.5s ease-in-out;
}

@keyframes csm-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Loading Overlay */
.csm-loading-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 2rem;
    text-align: center;
    border-radius: var(--csm-border-radius);
    box-shadow: var(--csm-shadow);
    z-index: 1000;
    animation: csm-fadeInUp 0.3s ease-out;
}

.csm-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid var(--csm-gray-300);
    border-top-color: var(--csm-primary);
    border-radius: 50%;
    animation: csm-spin 1s linear infinite;
}

.csm-loading-overlay p {
    color: var(--csm-gray-700);
    font-weight: 500;
    margin: 0;
}

/* Notifications */
.csm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 1rem 3rem 1rem 1rem;
    border-radius: var(--csm-border-radius);
    box-shadow: var(--csm-shadow-lg);
    z-index: 10000;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: csm-slideInFromRight 0.5s ease-out;
}

@keyframes csm-slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.csm-notification-success {
    background: #f0fff4;
    border-left: 5px solid var(--csm-success);
    color: #22543d;
}

.csm-notification-error {
    background: #fff5f5;
    border-left: 5px solid var(--csm-error);
    color: #742a2a;
}

.csm-notification-info {
    background: #ebf8ff;
    border-left: 5px solid var(--csm-primary);
    color: #2a4365;
}

.csm-notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: var(--csm-transition);
}

.csm-notification-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Visibility Animation Class */
.csm-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .csm-request-form-container,
    .csm-tracking-container,
    .csm-edit-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .csm-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .csm-shipment-form,
    .csm-tracking-results,
    .csm-tracking-container {
        padding: 10px;
    }

    .csm-submit-btn,
    .track-button,
    #csm-add-shipment {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .csm-request-form-container,
    .csm-tracking-container,
    .csm-edit-container {
        padding: 8px;
    }

    .csm-form-group input,
    .csm-form-group select,
    .csm-form-group textarea {
        font-size: 14px;
        padding: 8px;
    }

    .csm-tracking-actions {
        flex-direction: column;
    }
}

/* Make all buttons same color */
#csm-add-shipment,
.csm-submit-btn,
.track-button,
.csm-edit-btn,
.csm-edit-link,
.csm-invoice-link,
.csm-waybill-link {
    background-color: #00a7b4 !important; /* exact same as top button */
    color: white !important;
    border: none !important;
}

/* Hover state for all buttons */
#csm-add-shipment:hover,
.csm-submit-btn:hover,
.track-button:hover,
.csm-edit-btn:hover,
.csm-edit-link:hover,
.csm-invoice-link:hover,
.csm-waybill-link:hover {
    background-color: #005177 !important; /* darker shade on hover */
}

/* Shipment History Styles */
.csm-shipments-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.csm-shipments-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.csm-stat-box {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 20px;
    background: var(--csm-primary);
    color: white;
    border-radius: var(--csm-border-radius);
    box-shadow: 0 2px 8px rgba(0, 167, 180, 0.2);
    transition: var(--csm-transition);
}

.csm-stat-box:hover {
    background: var(--csm-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 167, 180, 0.25);
}

.csm-stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.csm-stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
}

.csm-shipments-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.csm-shipments-table th,
.csm-shipments-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.csm-shipments-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #00a7b4;
}

.csm-shipments-table tr:hover {
    background: #f5f9ff;
}

.csm-tracking-cell {
    font-family: monospace;
}

.csm-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-in-transit { background: #e2e3ff; color: #383d41; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.csm-actions-cell {
    white-space: nowrap;
}

.csm-btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    background: #00a7b4;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.csm-btn:hover {
    background: #005177;
    color: white;
}

.csm-btn-small {
    padding: 4px 8px;
    font-size: 0.8em;
}

.csm-btn-primary {
    background: #007cba;
}

.csm-btn-primary:hover {
    background: #005a87;
}

/* Modal Styles */
.csm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.csm-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.csm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.csm-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.csm-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.csm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.csm-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.csm-modal-body {
    padding: 20px;
    min-width: 400px;
}

.csm-receipt-content .csm-modal-body {
    min-width: 500px;
}

/* Shipment Details Styles */
.csm-shipment-details {
    max-width: 800px;
}

.csm-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.csm-details-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.csm-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.csm-detail-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #00a7b4;
}

.csm-detail-section h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.csm-detail-section p {
    margin: 8px 0;
    line-height: 1.4;
}

.csm-qr-code {
    text-align: center;
}

.csm-qr-code img {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.csm-qr-code p {
    font-family: monospace;
    font-weight: bold;
    color: #2c3e50;
}

.csm-notes-section {
    grid-column: 1/-1;
}

/* Receipt Styles */
.csm-receipt {
    max-width: 400px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
}

.csm-receipt-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.csm-company-logo h2 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: bold;
}

.csm-company-logo p {
    margin: 0;
    font-size: 10px;
    color: #666;
}

.csm-receipt-info {
    margin-top: 15px;
}

.csm-receipt-info h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    letter-spacing: 2px;
}

.csm-receipt-qr {
    text-align: center;
    margin: 15px 0;
}

.csm-receipt-qr img {
    border: 1px solid #ddd;
}

.csm-receipt-table,
.csm-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.csm-receipt-table td,
.csm-pricing-table td {
    padding: 3px 0;
    border-bottom: 1px dotted #ccc;
}

.csm-receipt-table td:first-child {
    width: 40%;
}

.csm-pricing-table {
    border-top: 1px solid #333;
    margin-top: 15px;
}

.csm-total-row {
    border-top: 2px solid #333 !important;
    border-bottom: 2px solid #333 !important;
    font-weight: bold;
}

.csm-receipt-barcode {
    text-align: center;
    margin: 20px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 10px 0;
}

.csm-receipt-barcode img {
    margin-bottom: 5px;
}

.csm-receipt-barcode p {
    margin: 0;
    font-size: 10px;
    font-weight: bold;
}

.csm-receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #333;
    font-size: 10px;
    color: #666;
}

.csm-receipt-footer p {
    margin: 3px 0;
}

.csm-receipt-date {
    margin-top: 10px !important;
    font-style: italic;
}

/* Loading Animation */
.csm-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.csm-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #00a7b4;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .csm-modal,
    .csm-modal-header,
    .csm-modal-actions,
    .csm-btn {
        display: none !important;
    }
    
    .csm-receipt {
        max-width: none;
        width: 100%;
        margin: 0;
        font-size: 10pt;
    }
    
    .csm-receipt-content .csm-modal-body {
        padding: 0;
        min-width: auto;
    }
    
    body * {
        visibility: hidden;
    }
    
    #csm-receipt-print,
    #csm-receipt-print * {
        visibility: visible;
    }
    
    #csm-receipt-print {
        position: absolute;
        left: 0;
        top: 0;
    }
}
.csm-invoices-container {
    
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
    padding-bottom: 15px;
    margin-bottom:20px;
    width: 100%;
    
}


    
    
    
    
