/* ===== Autonomous Order System Styles ===== */

.order-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 40px 20px;
}

.order-container {
    max-width: 700px;
    margin: 0 auto;
}

.order-success-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease-out;
}

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

.success-icon {
    text-align: center;
    margin-bottom: 24px;
}

.success-icon i {
    font-size: 4rem;
    color: #22c55e;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.order-success-card h1 {
    text-align: center;
    color: #0f172a;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.order-number {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.order-number span {
    font-weight: 700;
    color: #1a73e8;
}

/* Timeline */
.order-timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 0;
    position: relative;
}

.order-timeline::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.timeline-step .step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.timeline-step .step-icon i {
    font-size: 1.2rem;
    color: #94a3b8;
}

.timeline-step.active .step-icon {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    box-shadow: 0 4px 15px rgba(26,115,232,0.4);
}

.timeline-step.active .step-icon i {
    color: white;
}

.timeline-step.completed .step-icon {
    background: #22c55e;
}

.timeline-step.completed .step-icon i {
    color: white;
}

.timeline-step .step-info {
    text-align: center;
}

.timeline-step .step-title {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.timeline-step.active .step-title {
    color: #1a73e8;
}

.timeline-step.completed .step-title {
    color: #22c55e;
}

.timeline-step .step-status {
    font-size: 0.7rem;
    color: #94a3b8;
}

.timeline-step.active .step-status {
    color: #1a73e8;
    font-weight: 600;
}

.timeline-step.completed .step-status {
    color: #22c55e;
}

/* Order Details */
.order-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.order-details h3 {
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

.detail-row span:first-child {
    color: #64748b;
}

.detail-row span:last-child {
    color: #0f172a;
    font-weight: 600;
}

/* Next Steps */
.next-steps {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #bfdbfe;
}

.next-steps h3 {
    color: #1e40af;
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    color: #1e3a8a;
    font-size: 0.9rem;
    padding: 8px 0;
    line-height: 1.5;
}

.next-steps li strong {
    color: #1a73e8;
}

/* Support */
.support-info {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 24px;
}

.support-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.support-info a {
    color: #1a73e8;
    font-weight: 600;
}

.btn-back {
    display: block;
    text-align: center;
    padding: 14px 32px;
    background: #1a73e8;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #1557b0;
    transform: translateY(-2px);
}

/* ===== Products Page ===== */
.products-page {
    background: #f8fafc;
}

.products-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 0;
    text-align: center;
    color: white;
}

.products-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.products-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.products-section {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.product-image {
    height: 180px;
    background: linear-gradient(135deg, #1a73e8, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.product-image i {
    font-size: 4rem;
    color: white;
    z-index: 1;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-content {
    padding: 24px;
}

.product-content h3 {
    color: #0f172a;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.product-content p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.product-features li {
    color: #475569;
    font-size: 0.9rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-features li i {
    color: #22c55e;
    font-size: 0.8rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
}

.product-price span {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
}

.btn-buy {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-buy:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(26,115,232,0.4);
}

/* ===== Admin Dashboard ===== */
.admin-page {
    background: #0f172a;
    min-height: 100vh;
}

.admin-header {
    background: #1e293b;
    padding: 20px 0;
    border-bottom: 1px solid #334155;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: white;
}

.admin-content {
    padding: 40px 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #334155;
}

.admin-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.admin-stat-card .stat-icon i {
    font-size: 1.5rem;
}

.admin-stat-card .stat-icon.blue { background: rgba(26,115,232,0.2); color: #60a5fa; }
.admin-stat-card .stat-icon.green { background: rgba(34,197,94,0.2); color: #4ade80; }
.admin-stat-card .stat-icon.yellow { background: rgba(245,158,11,0.2); color: #fbbf24; }
.admin-stat-card .stat-icon.red { background: rgba(239,68,68,0.2); color: #f87171; }

.admin-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.admin-stat-card .stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.orders-section {
    background: #1e293b;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #334155;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    color: white;
    font-size: 1.3rem;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.orders-table th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.orders-table td {
    color: white;
    font-size: 0.95rem;
}

.order-id {
    font-family: monospace;
    color: #60a5fa !important;
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.payment_received { background: rgba(26,115,232,0.2); color: #60a5fa; }
.status-badge.building { background: rgba(245,158,11,0.2); color: #fbbf24; }
.status-badge.ready_for_approval { background: rgba(168,85,247,0.2); color: #c084fc; }
.status-badge.approved { background: rgba(34,197,94,0.2); color: #4ade80; }
.status-badge.delivering { background: rgba(59,130,246,0.2); color: #60a5fa; }
.status-badge.completed { background: rgba(34,197,94,0.3); color: #4ade80; }

.btn-action {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-approve {
    background: #22c55e;
    color: white;
}

.btn-approve:hover {
    background: #16a34a;
}

.btn-deliver {
    background: #3b82f6;
    color: white;
}

.btn-deliver:hover {
    background: #2563eb;
}

.btn-view {
    background: #64748b;
    color: white;
}

.btn-view:hover {
    background: #475569;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal h2 {
    color: #0f172a;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

@media (max-width: 768px) {
    .order-timeline {
        flex-direction: column;
        gap: 20px;
    }
    
    .order-timeline::before {
        display: none;
    }
    
    .timeline-step {
        flex-direction: row;
        gap: 16px;
    }
    
    .timeline-step .step-info {
        text-align: left;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .orders-table {
        display: block;
        overflow-x: auto;
    }
}
