/* TailorConnect Complete Stylesheet */

:root {
    --tc-primary: #2563eb;
    --tc-primary-dark: #1d4ed8;
    --tc-primary-light: #dbeafe;
    --tc-secondary: #64748b;
    --tc-success: #10b981;
    --tc-success-light: #d1fae5;
    --tc-error: #ef4444;
    --tc-error-light: #fee2e2;
    --tc-warning: #f59e0b;
    --tc-warning-light: #fef3c7;
    --tc-light: #f8fafc;
    --tc-lighter: #f1f5f9;
    --tc-dark: #1e293b;
    --tc-border: #e2e8f0;
    --tc-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --tc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --tc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --tc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --tc-radius: 8px;
    --tc-radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

/* Container & Layout */
.tc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--tc-dark);
}

.tc-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, var(--tc-primary), var(--tc-primary-dark));
    color: white;
    border-radius: var(--tc-radius-lg);
    box-shadow: var(--tc-shadow-lg);
}

.tc-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.tc-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Forms */
.tc-form {
    background: white;
    border-radius: var(--tc-radius-lg);
    box-shadow: var(--tc-shadow-xl);
    border: 1px solid var(--tc-border);
    overflow: hidden;
    margin-bottom: 30px;
}

.tc-section {
    padding: 30px;
    border-bottom: 1px solid var(--tc-border);
}

.tc-section:last-child {
    border-bottom: none;
}

.tc-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tc-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tc-help-text {
    margin: -10px 0 20px 0;
    color: var(--tc-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.tc-form-group {
    margin-bottom: 24px;
}

.tc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--tc-dark);
    font-size: 14px;
}

.tc-form-group input,
.tc-form-group textarea,
.tc-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--tc-border);
    border-radius: var(--tc-radius);
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.tc-form-group input:focus,
.tc-form-group textarea:focus,
.tc-form-group select:focus {
    outline: none;
    border-color: var(--tc-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.tc-form-group input::placeholder,
.tc-form-group textarea::placeholder {
    color: var(--tc-secondary);
    opacity: 0.7;
}

.tc-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Measurements Grid */
.tc-measurements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Buttons */
.tc-btn-primary {
    background: linear-gradient(135deg, var(--tc-primary), var(--tc-primary-dark));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--tc-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--tc-shadow-md);
}

.tc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--tc-shadow-lg);
}

.tc-btn-primary:disabled {
    background: var(--tc-secondary);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.tc-btn-secondary {
    background: white;
    color: var(--tc-primary);
    border: 2px solid var(--tc-primary);
    padding: 10px 20px;
    border-radius: var(--tc-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tc-btn-secondary:hover {
    background: var(--tc-primary);
    color: white;
    transform: translateY(-1px);
}

/* Form Actions */
.tc-form-actions {
    padding: 30px;
    background: var(--tc-lighter);
    text-align: center;
}

.tc-form-actions .tc-btn-primary {
    min-width: 200px;
    justify-content: center;
}

/* Results & Messages */
.tc-result {
    margin-top: 20px;
    border-radius: var(--tc-radius-lg);
    overflow: hidden;
    box-shadow: var(--tc-shadow-md);
}

.tc-success {
    background: var(--tc-success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 24px;
}

.tc-success h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
}

.tc-success p {
    margin: 8px 0;
}

.tc-error {
    background: var(--tc-error-light);
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 24px;
}

.tc-error h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
}

/* Dashboard Stats */
.tc-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.tc-stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--tc-radius-lg);
    box-shadow: var(--tc-shadow-lg);
    border: 1px solid var(--tc-border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.tc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tc-shadow-xl);
}

.tc-stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tc-primary-light);
    border-radius: 50%;
}

.tc-stat-info {
    flex: 1;
}

.tc-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--tc-primary);
    line-height: 1;
}

.tc-stat-label {
    display: block;
    font-size: 14px;
    color: var(--tc-secondary);
    margin-top: 4px;
    font-weight: 500;
}

/* Orders Section */
.tc-orders-section {
    background: white;
    border-radius: var(--tc-radius-lg);
    box-shadow: var(--tc-shadow-lg);
    overflow: hidden;
}

.tc-section-header {
    padding: 24px;
    background: var(--tc-lighter);
    border-bottom: 1px solid var(--tc-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tc-section-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tc-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tc-orders-container {
    padding: 24px;
}

/* Order Cards */
.tc-order-card {
    background: white;
    border: 2px solid var(--tc-border);
    border-radius: var(--tc-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--tc-shadow);
}

.tc-order-card:hover {
    border-color: var(--tc-primary-light);
    box-shadow: var(--tc-shadow-md);
    transform: translateY(-1px);
}

.tc-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tc-border);
}

.tc-order-title h4 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tc-dark);
}

.tc-order-date {
    font-size: 0.9rem;
    color: var(--tc-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Status Badges */
.tc-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.tc-status-pending {
    background: var(--tc-warning-light);
    color: #92400e;
}

.tc-status-accepted {
    background: #dbeafe;
    color: #1e40af;
}

.tc-status-in_progress {
    background: #e0e7ff;
    color: #3730a3;
}

.tc-status-completed {
    background: var(--tc-success-light);
    color: #065f46;
}

.tc-status-cancelled {
    background: var(--tc-error-light);
    color: #991b1b;
}

/* Order Body */
.tc-order-body {
    margin-bottom: 20px;
}

.tc-customer-info,
.tc-measurements-info,
.tc-fabric-info,
.tc-style-info {
    background: var(--tc-light);
    padding: 16px;
    border-radius: var(--tc-radius);
    margin-bottom: 16px;
}

.tc-customer-info h5,
.tc-measurements-info h5,
.tc-fabric-info h5,
.tc-style-info h5 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tc-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tc-customer-info p,
.tc-measurements-info p,
.tc-fabric-info p,
.tc-style-info p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--tc-dark);
}

.tc-customer-info a {
    color: var(--tc-primary);
    text-decoration: none;
}

.tc-customer-info a:hover {
    text-decoration: underline;
}

/* Order Actions */
.tc-order-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--tc-border);
}

.tc-status-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 2px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tc-status-select:focus {
    outline: none;
    border-color: var(--tc-primary);
}

.tc-update-status {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

/* Loading States */
.tc-loading-container {
    text-align: center;
    padding: 60px 20px;
}

.tc-loading {
    color: var(--tc-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.tc-no-orders {
    text-align: center;
    padding: 60px 20px;
    color: var(--tc-secondary);
}

.tc-no-orders-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.tc-no-orders h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: var(--tc-dark);
}

.tc-error-container {
    text-align: center;
    padding: 40px 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tc-container {
        padding: 15px;
    }
    
    .tc-header {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .tc-header h2 {
        font-size: 1.75rem;
    }
    
    .tc-section {
        padding: 20px;
    }
    
    .tc-measurements-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tc-stats-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tc-order-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .tc-order-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tc-status-select {
        min-width: auto;
    }
    
    .tc-section-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .tc-form-actions .tc-btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tc-container {
        padding: 10px;
    }
    
    .tc-header h2 {
        font-size: 1.5rem;
    }
    
    .tc-form-group input,
    .tc-form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .tc-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}
