/* ATX Defense Partner Portal Styles */
/* Based on Upload Portal branding with business workflow extensions */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: #323232;
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-section {
    flex-shrink: 0;
}

.company-logo {
    height: 60px;
    width: auto;
}

.title-section h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
}

.title-section p {
    color: #D15E14;
    font-size: 16px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Step Management */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 24px;
    color: #323232;
    margin-bottom: 15px;
    font-weight: 600;
}

.card p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.partner-info h2 {
    font-size: 24px;
    color: #323232;
    margin-bottom: 5px;
}

.partner-info p {
    color: #666;
    margin: 0;
}

.partner-id {
    font-family: monospace;
    font-size: 14px;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    gap: 10px;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #D15E14;
    color: white;
    box-shadow: 0 2px 8px rgba(209, 94, 20, 0.3);
}

.tab-btn:hover:not(.active) {
    background: #f8f9fa;
    color: #333;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #D15E14;
    box-shadow: 0 0 0 3px rgba(209, 94, 20, 0.1);
}

/* Ensure tel inputs have consistent width */
input[type="tel"] {
    width: 100% !important;
    min-width: 0;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Select Dropdown Styles */
select {
    width: 100%;
    padding: 14px;
    padding-right: 40px; /* Space for custom arrow */
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Remove default arrow in different browsers */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Custom arrow using background image (SVG) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

select:hover {
    border-color: #D15E14;
}

select:focus {
    outline: none;
    border-color: #D15E14;
    box-shadow: 0 0 0 3px rgba(209, 94, 20, 0.1);
}

/* Style for disabled select */
select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* File Upload Styles */
.file-upload-area {
    position: relative;
    border: 2px dashed #D15E14;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fef9f5;
}

.file-upload-area:hover {
    border-color: #B54A0F;
    background: #fef7f0;
}

.file-upload-area.dragover {
    border-color: #B54A0F;
    background: #fef7f0;
    transform: scale(1.02);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-prompt {
    pointer-events: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    fill: #D15E14;
    margin-bottom: 15px;
}

.upload-prompt p {
    margin: 8px 0;
    color: #333;
    font-weight: 500;
}

.file-types {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Selected Files */
.selected-files {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #D15E14;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 20px;
    height: 20px;
    fill: #D15E14;
}

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    font-size: 14px;
    color: #666;
}

.file-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.file-remove:hover {
    background: #f8f9fa;
}

/* Deal Info Styles */
.deal-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.deal-info h4 {
    color: #323232;
    margin-bottom: 15px;
    font-size: 16px;
}

.deal-info ul {
    list-style: none;
    padding-left: 0;
}

.deal-info li {
    padding: 8px 0;
    color: #666;
    border-bottom: 1px solid #e9ecef;
}

.deal-info li:last-child {
    border-bottom: none;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #D15E14;
    color: white;
}

.btn-primary:hover {
    background: #B54A0F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(209, 94, 20, 0.3);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-logout:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
    font-weight: bold;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loading {
    opacity: 1;
}

.btn-text,
.btn-loading {
    transition: opacity 0.3s ease;
}

.btn-loading {
    position: absolute;
    opacity: 0;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Deals Summary */
.deals-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(135deg, #D15E14 0%, #B54A0F 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(209, 94, 20, 0.2);
}

.summary-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Deals List */
.deals-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.deals-list-header h4 {
    color: #323232;
    font-size: 20px;
}

.deals-list {
    display: grid;
    gap: 15px;
}

.deal-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.deal-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.deal-title {
    font-size: 18px;
    font-weight: 600;
    color: #323232;
    margin-bottom: 5px;
}

.deal-meta {
    font-size: 14px;
    color: #666;
}

.deal-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-registered {
    background: #fff3cd;
    color: #856404;
}

.status-qualified {
    background: #d4edda;
    color: #155724;
}

.status-in-progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-closed-won {
    background: #d4edda;
    color: #155724;
}

.status-closed-lost {
    background: #f8d7da;
    color: #721c24;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.deal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.deal-detail {
    text-align: center;
}

.deal-detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.deal-detail-value {
    font-weight: 600;
    color: #333;
}

/* Loading States */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D15E14;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-deals {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-deals-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

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

.success-icon {
    width: 64px;
    height: 64px;
    background: #28a745;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.modal-content h3 {
    color: #323232;
    margin-bottom: 15px;
}

.deal-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay .loading-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8d7da;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    text-align: center;
    color: #666;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.footer p {
    margin: 8px 0;
}

.footer a {
    color: #D15E14;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .card {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .deals-summary {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 24px;
    }
    
    .card h3 {
        font-size: 20px;
    }
    
    .btn {
        width: 100%;
    }
    
    .file-upload-area {
        padding: 25px 15px;
    }
}

/* Landing Page Styles */
.landing-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.option-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.option-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #D15E14 0%, #B54A0F 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.option-icon svg {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    flex-shrink: 0;
}

.option-card h3 {
    font-size: 24px;
    color: #323232;
    margin-bottom: 15px;
    font-weight: 600;
}

.option-card p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.info-section {
    margin-bottom: 40px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.info-card h4 {
    color: #323232;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 10px 0;
    color: #666;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 25px;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #D15E14;
    font-weight: bold;
    font-size: 16px;
}

/* Admin-specific styling */
.admin-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
}

.admin-link:hover {
    color: #495057;
    text-decoration: underline;
}

.login-info {
    margin-top: 20px;
    text-align: center;
}

.login-info p {
    margin: 5px 0;
}

.partner-credentials {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 4px solid #28a745;
}

.partner-credentials code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #495057;
}