/**
 * Order Modal Styles
 * AntSoft slate/blue theme adapted for License Commander
 */

/* Modal Overlay */
.order-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.order-modal-overlay.hidden {
    display: none;
}

/* Modal Container */
.order-modal-container {
    background: white;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    max-height: 100vh;
    overflow-y: auto;
}

/* Modal Header */
.order-modal-header {
    background: linear-gradient(135deg, #0064a4 0%, #0086c3 100%);
    padding: 15px;
    border-radius: 12px 12px 0 0;
    margin: -20px -20px 15px -20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

/* Eyebrow — matches the unified modal design language (carries the email-card look) */
.order-modal-eyebrow {
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.order-modal-title {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.order-modal-subtitle {
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
}

.order-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.order-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Body */
.order-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* UID Input Section (Key Addition for LC) */
.order-uid-section {
    margin-bottom: 0;
    padding: 0.4rem 0.6rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    border-left: 3px solid #3b82f6;
}

.order-uid-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    display: block;
}

.order-uid-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.order-uid-input {
    width: 90%;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    outline: none;
    font-size: 0.875rem;
}

.order-upload-csv-btn {
    background: linear-gradient(180deg, #5cb85c 0%, #449d44 100%);
    border: 1px solid #398439;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
    line-height: 1;
    white-space: nowrap;
}

.order-upload-csv-btn:hover {
    background: linear-gradient(180deg, #449d44 0%, #398439 100%);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
    transform: translateY(-1px);
}

.order-upload-csv-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(76, 175, 80, 0.3);
}

.order-uid-helper {
    font-size: 0.625rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    font-style: italic;
}

/* CSV Upload Progress Indicator */
.order-csv-progress {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
}

.order-csv-progress-bar {
    width: 100%;
    height: 8px;
    background: #dcfce7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.order-csv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.order-csv-progress-text {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
    text-align: center;
}

/* UID Search Results Dropdown */
.order-uid-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-height: 12rem;
    overflow-y: auto;
    z-index: 10;
    margin-top: 0;
}

.order-uid-search-results.hidden {
    display: none;
}

.order-uid-search-result {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s;
}

.order-uid-search-result:last-child {
    border-bottom: none;
}

.order-uid-search-result:hover {
    background: #f1f5f9;
}

.order-uid-search-result-uid {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.875rem;
}

.order-uid-search-result-name {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
}

.order-uid-search-result-dept {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

.order-uid-search-empty {
    padding: 0.75rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
}

.order-uid-search-loading {
    padding: 0.75rem;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
}

.order-uid-input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

.order-uid-hint {
    font-size: 0.625rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Eligibility Badges */
.order-eligibility-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.order-badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-badge-subsidy {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.order-badge-csc {
    background: #eff6ff;
    color: #1e40af;
    border-color: #dbeafe;
}

/* Software Title Display */
.order-title-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.order-icon-container {
    width: 3rem;
    height: 3rem;
    background: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.order-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.order-icon-stroke {
    color: #64748b;
}

/* Specific icon colors for better visual distinction */
svg.order-icon path[d*="M3.5 7"] {
    /* Visual Studio - violet */
    stroke: #8b5cf6 !important;
}

svg.order-icon path[d*="M21.21 15.89"] {
    /* SAS - blue */
    stroke: #1e40af !important;
}

svg.order-icon path[d*="a14.5 14.5"] {
    /* ArcGIS - emerald */
    stroke: #059669 !important;
}

svg.order-icon line {
    /* SPSS - orange/pink */
    stroke: #f97316 !important;
}

.order-title-text {
    flex: 1;
    min-width: 0;
}

.order-title-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.order-title-label {
    font-size: 0.625rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Product Brief */
.order-brief {
    background: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    border-left: 4px solid #FFD200;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-style: italic;
}

.order-brief-text {
    font-size: 0.75rem;
    color: #475569;
    font-style: italic;
    line-height: 1.5;
}

/* Form Section */
.order-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Group */
.order-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Prominent Software Title Selection */
.order-form-group.software-title-group {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #60a5fa;
    border-radius: 0.75rem;
    padding: 0.6rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
    position: relative;
}

.order-form-group.software-title-group .order-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

/* Custom Select Dropdown */
.order-custom-select {
    position: relative;
    width: 100%;
}

.order-custom-select-trigger {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border: 2px solid #93c5fd;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.order-custom-select-trigger-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.order-custom-select-trigger-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.order-custom-select-trigger:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.order-custom-select.open .order-custom-select-trigger {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.order-custom-select-arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.order-custom-select.open .order-custom-select-arrow {
    transform: rotate(180deg);
}

.order-custom-select-options {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #93c5fd;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.order-custom-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.order-custom-select-option:hover {
    background-color: #eff6ff;
}

.order-custom-select-option.selected {
    background-color: #dbeafe;
    font-weight: 600;
}

.order-custom-select-option-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSC Badge in Dropdown */
.order-dropdown-badge-csc {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
}

.order-form-group.software-title-group .order-select {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border: 2px solid #93c5fd;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.order-form-group.software-title-group .order-select:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.order-form-group.software-title-group .order-select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    border-color: #2563eb;
}

/* Dark Mode Support for Software Title Group */
body.dark-mode .order-form-group.software-title-group {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    border-color: #3b82f6;
}

body.dark-mode .order-form-group.software-title-group .order-label {
    color: #93c5fd;
}

body.dark-mode .order-custom-select-trigger {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-mode .order-custom-select-trigger:hover {
    border-color: #60a5fa;
}

body.dark-mode .order-custom-select.open .order-custom-select-trigger {
    border-color: #3b82f6;
}

body.dark-mode .order-custom-select-options {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .order-custom-select-option:hover {
    background-color: #334155;
}

body.dark-mode .order-custom-select-option.selected {
    background-color: #1e3a5f;
}

body.dark-mode .order-form-group.software-title-group .order-select {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-mode .order-form-group.software-title-group .order-select:hover {
    border-color: #60a5fa;
}

body.dark-mode .order-form-group.software-title-group .order-select:focus {
    border-color: #3b82f6;
}

/* Form Label */
.order-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Two-Column Grid for Form Fields */
.order-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .order-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Select Dropdown */
.order-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    outline: none;
    background: white;
    font-size: 0.875rem;
}

.order-select:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

/* Quantity Section */
.order-qty-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.order-qty-section.hidden {
    display: none;
}

.order-qty-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: -0.025em;
}

.order-qty-input {
    width: 5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    text-align: right;
    font-weight: 700;
    outline: none;
    font-size: 0.875rem;
}

.order-qty-input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

/* Input Fields */
.order-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    outline: none;
    font-size: 0.875rem;
}

.order-input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

.order-input::placeholder {
    color: #cbd5e1;
    opacity: 1;
}

.order-input.order-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(254, 202, 202, 0.5);
    background-color: #fef2f2;
}

.order-input:read-only {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Accounting Fields Grid (2x2) */
.order-accounting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

@media (max-width: 640px) {
    .order-accounting-grid {
        grid-template-columns: 1fr;
    }
}

.order-accounting-grid .order-form-group {
    margin-bottom: 0;
}

.order-accounting-grid .order-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.order-accounting-grid .order-input {
    font-size: 0.875rem;
}

/* Cost Display */
.order-cost-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    border-top: 2px solid #e3f2fd;
    padding-top: 15px;
    margin-top: 15px;
}

.order-cost-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.order-cost-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

/* Adobe Upgrade/Downgrade Note */
.order-adobe-note {
    background: #eff6ff;
    padding: 0.5rem 0.6rem;
    border-radius: 0.375rem;
    border-left: 3px solid #3b82f6;
    font-size: 0.7rem;
    color: #1e40af;
    line-height: 1.3;
    font-weight: 600;
}

.order-adobe-note.downgrade {
    background: #f0fdf4;
    border-left-color: #16a34a;
    color: #15803d;
}

.order-adobe-note.hidden {
    display: none;
}

/* Button Container */
.order-button-container {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
}

/* Buttons */
/* Unified with the app's .md-btn system (11px radius, 42px, intent-colored). */
.order-btn {
    height: 42px;
    padding: 0 20px;
    border-radius: 11px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter 0.15s, transform 0.05s, background 0.15s;
}

.order-btn:active { transform: translateY(1px); }

.order-btn-primary {
    background: linear-gradient(135deg, #0064a4 0%, #0086c3 100%);
    color: white;
}

.order-btn-primary:hover { filter: brightness(1.06); }

.order-btn-secondary {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}

.order-btn-secondary:hover { background: #f8fafc; }

.order-btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
}

.order-btn-success:hover { filter: brightness(1.06); }

/* Summary View */
.order-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-summary-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.order-summary-message {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-radius: 0.5rem;
    padding: 0.75rem 0.875rem;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.1);
    font-size: 0.8125rem;
    line-height: 1.7;
    color: #15803d;
    font-weight: 600;
}

.order-summary-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    border-top: 2px solid #dcfce7;
    padding-top: 12px;
    justify-content: flex-end;
}

.order-summary.hidden {
    display: none;
}

.order-summary-box {
    background: #eff6ff;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #dbeafe;
}

.order-summary-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    text-align: center;
}

.order-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
}

.order-summary-label {
    color: #64748b;
}

.order-summary-value {
    font-weight: 700;
    color: #1e293b;
}

.order-summary-value.mono {
    font-family: monospace;
}

.order-summary-total {
    border-top: 2px solid #bfdbfe;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 1.125rem;
}

.order-summary-total-label {
    font-weight: 700;
    color: #475569;
}

.order-summary-total-value {
    font-weight: 900;
    color: #1e40af;
}

.order-review-message {
    color: #15803d;
    font-weight: 700;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Checking Modal */
.order-checking-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
}

.order-checking-modal.hidden {
    display: none;
}

.order-checking-content {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.order-spinner {
    width: 2rem;
    height: 2rem;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: order-spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes order-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animated dots for "Calculating..." */
@keyframes dots-fade {
    0%, 20% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.dots {
    display: inline-block;
    animation: dots-fade 1.5s infinite;
}

.order-checking-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #475569;
}

/* Header Button */
.order-trigger-btn {
    background: #42a5f5;
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(66, 165, 245, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.order-trigger-btn:hover {
    background: #1976d2;
    box-shadow: 0 10px 15px -3px rgba(25, 118, 210, 0.3);
}

.order-trigger-icon {
    width: 1rem;
    height: 1rem;
}

.order-trigger-text {
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* AMAPI Trigger Button (Header - matches Order button dimensions) */
.amapi-trigger-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.amapi-trigger-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.amapi-trigger-icon {
    width: 1rem;
    height: 1rem;
}

.amapi-trigger-text {
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Download My Software Button (Header - matches Order button dimensions) */
.download-software-btn {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.download-software-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.4);
    transform: translateY(-1px);
}

.download-software-icon {
    width: 1rem;
    height: 1rem;
}

.download-software-text {
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Responsive */
@media (max-width: 768px) {
    .order-modal-container {
        max-width: 95%;
        padding: 1rem;
    }
    
    .order-title-display {
        flex-direction: row;
        text-align: left;
    }
    
    .order-trigger-text {
        display: none;
    }
    
    .order-trigger-btn {
        padding: 0.5rem;
    }
    
    .amapi-trigger-text {
        display: none;
    }
    
    .amapi-trigger-btn {
        padding: 0.5rem;
    }
    
    .download-software-text {
        display: none;
    }
    
    .download-software-btn {
        padding: 0.5rem;
    }
}
/* ========================================
   BULK ORDER FEATURES
   ======================================== */

/* Manage Users Link */
.order-manage-users-link {
    color: #2196f3;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.order-manage-users-link:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.order-manage-users-link.hidden {
    display: none !important;
}

/* User Chips Container */
.order-user-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.4rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    height: 36px;
    overflow: hidden;
}

.order-user-chips.hidden {
    display: none !important;
}

.order-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

/* Pastel color variations for chips */
.order-user-chip[data-color="0"] {
    background: #fecaca; /* Light red */
    color: #7f1d1d;
}

.order-user-chip[data-color="1"] {
    background: #fed7aa; /* Light orange */
    color: #7c2d12;
}

.order-user-chip[data-color="2"] {
    background: #fef08a; /* Light yellow */
    color: #713f12;
}

.order-user-chip[data-color="3"] {
    background: #d9f99d; /* Light lime */
    color: #365314;
}

.order-user-chip[data-color="4"] {
    background: #a7f3d0; /* Light green */
    color: #064e3b;
}

.order-user-chip[data-color="5"] {
    background: #a5f3fc; /* Light cyan */
    color: #164e63;
}

.order-user-chip[data-color="6"] {
    background: #bae6fd; /* Light blue */
    color: #0c4a6e;
}

.order-user-chip[data-color="7"] {
    background: #ddd6fe; /* Light purple */
    color: #4c1d95;
}

.order-user-chip[data-color="8"] {
    background: #f5d0fe; /* Light pink */
    color: #701a75;
}

.order-user-chip[data-color="9"] {
    background: #fecdd3; /* Light rose */
    color: #881337;
}

/* Overflow indicator chip */
.order-user-chip-more {
    background: #e5e7eb !important;
    color: #4b5563 !important;
    cursor: default;
    font-style: italic;
}

.order-user-chip-more:hover {
    opacity: 1 !important;
    transform: none !important;
}

.order-user-chip:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.order-user-chip-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    opacity: 0.7;
}

.order-user-chip-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

/* Bulk User Count */
.order-bulk-user-count {
    display: none !important;
    margin-top: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    text-align: center;
}

.order-bulk-user-count.hidden {
    display: none !important;
}

/* Bulk Billing Checkbox Container */
.order-bulk-billing-container {
    margin: 0.25rem 0 0.25rem 0;
    padding: 0.5rem 0.75rem;
    background: #f0f9ff;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.order-bulk-billing-container.hidden {
    display: none !important;
}

.order-bulk-billing-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0369a1;
}

.order-bulk-billing-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* User Billing Switcher */
.order-billing-switcher {
    margin: 0.25rem 0 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border-radius: 6px;
    border: 1px solid #fcd34d;
}

.order-billing-switcher.hidden {
    display: none !important;
}

.order-billing-switcher-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.order-billing-nav-btn {
    background: #fbbf24;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.order-billing-nav-btn:hover {
    background: #f59e0b;
}

.order-billing-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.order-billing-user-info {
    flex: 1;
    text-align: center;
    line-height: 1.2;
}

.order-billing-user-name {
    font-weight: 600;
    color: #92400e;
    font-size: 0.8rem;
}

.order-billing-user-counter {
    font-size: 0.7rem;
    color: #b45309;
    margin-top: 0.1rem;
}

/* Slide-Over Drawer */
.order-user-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.order-user-drawer.hidden {
    display: none !important;
}

.order-user-drawer.active {
    transform: translateX(0);
}

.order-user-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.order-user-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
}

.order-user-drawer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.order-user-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.order-user-drawer-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.order-user-drawer-body {
    flex: 1;
    overflow-y: visible;
    padding: 1rem;
}

.order-drawer-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.order-drawer-user-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.order-drawer-user-info {
    flex: 1;
}

.order-drawer-user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.order-drawer-user-uid {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.order-drawer-user-actions {
    display: flex;
    gap: 0.5rem;
}

.order-drawer-action-btn {
    background: none;
    border: 1px solid #cbd5e1;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.order-drawer-action-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* Skipped users section in drawer */
.order-drawer-skipped-section {
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.order-drawer-skipped-header {
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.order-drawer-skipped-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fffbeb;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid #fde68a;
    opacity: 0.85;
}

/* Available license transfer section in drawer */
.order-drawer-transfer-section {
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.order-drawer-transfer-header {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.order-drawer-transfer-content {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 0.75rem;
}

.order-drawer-transfer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-drawer-transfer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e0f2fe;
}

.order-drawer-transfer-row:last-of-type {
    border-bottom: none;
}

.order-drawer-transfer-label {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.order-drawer-transfer-value {
    font-size: 0.8rem;
    color: #0f172a;
    font-weight: 600;
    text-align: right;
}

.order-drawer-transfer-note {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #dcfce7;
    border-radius: 4px;
    color: #15803d;
    font-size: 0.8rem;
    text-align: center;
    border: 1px solid #bbf7d0;
}

/* Responsive adjustments for drawer */
@media (max-width: 768px) {
    .order-user-drawer {
        width: 280px;
    }
}