/* RMA Website - Main Stylesheet */
/* KashCart RMA Portal - Professional Design */

:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #e94560;
    --accent-hover: #c73e54;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --info: #0984e3;
    --light: #f8f9fa;
    --dark: #2d3436;
    --gray: #636e72;
    --light-gray: #b2bec3;
    --border: #dfe6e9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Navbar */
.navbar {
    background: rgba(26, 26, 46, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(233, 69, 96, 0.2);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: #fff;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    padding: 1.2rem;
    font-weight: 600;
}

.card-header h4, .card-header h5 {
    margin: 0;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #00a884 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f0b84e 100%);
    color: var(--dark);
}

.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* Status Badges */
.badge {
    padding: 0.5em 1em;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-received { background: #d1ecf1; color: #0c5460; }
.badge-dispatch_pending { background: #f8d7da; color: #721c24; }
.badge-dispatched { background: #d4edda; color: #155724; }
.badge-company_received { background: #cce5ff; color: #004085; }
.badge-replacement_sent { background: #e2e3e5; color: #383d41; }
.badge-handover_pending { background: #fff3cd; color: #856404; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1a1a2e 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 50%;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Serial Lookup */
.serial-lookup-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 2rem;
}

.serial-input {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Auto-filled Fields */
.auto-filled {
    background-color: #e8f5e9 !important;
    border-color: #4caf50 !important;
}

/* Dashboard Stats */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--light-gray);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--light-gray);
}

.timeline-item.active::before {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.3);
}

.timeline-item.current::before {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Tables */
.table {
    border-radius: var(--radius);
    overflow: hidden;
}

.table thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
}

/* Login/Register Forms */
.auth-card {
    max-width: 500px;
    margin: 2rem auto;
}

.auth-card .card-body {
    padding: 2.5rem;
}

.user-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-type-option {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.user-type-option:hover {
    border-color: var(--accent);
}

.user-type-option.selected {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
}

.user-type-option i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Footer */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Image Upload */
.image-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.image-upload-zone:hover {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.02);
}

.image-preview {
    display: inline-block;
    margin: 0.5rem;
    position: relative;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .auth-card {
        margin: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark);
}
