/* assets/css/app.css - RishtaShure Master UI Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #881337;
    --primary-hover: #9f1239;
    --primary-light: #ffe4e6;
    --secondary: #fb7185;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Impersonation Floating Bar */
.impersonation-bar {
    background: linear-gradient(90deg, #b91c1c, #dc2626);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.impersonation-bar a.exit-btn {
    background: #fff;
    color: #b91c1c;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 700;
}

/* Header & Navigation */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.navbar-brand .brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.navbar-brand .brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
}

.nav-link {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(136, 19, 55, 0.25);
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155 !important;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary) !important;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff !important;
}

.btn-success {
    background: var(--success);
    color: #fff !important;
}

.btn-danger {
    background: var(--danger);
    color: #fff !important;
}

.btn-warning {
    background: var(--warning);
    color: #fff !important;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 13px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* Layout Containers */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding: 0 24px;
}

.page-content {
    flex: 1;
    padding: 30px 0;
}

/* Dashboard App Layout (Sidebar + Content) */
.app-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.app-sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.app-sidebar-header {
    padding: 0 12px 16px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.sidebar-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.6px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-item:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-item.active {
    color: #fff;
    background: var(--primary);
}

.sidebar-item .badge-pill {
    margin-left: auto;
}

.app-main {
    flex: 1;
    padding: 28px 36px;
    background: var(--bg-light);
    overflow-x: hidden;
}

/* Cards & Panels */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Metric / Stat Card */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.info { background: #dbeafe; color: var(--info); }

.stat-info .stat-val {
    font-size: 1.65rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: #0f172a;
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}

.badge-verified { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-platinum { background: linear-gradient(135deg, #475569, #0f172a); color: #fff; }
.badge-gold { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.badge-silver { background: #e2e8f0; color: #334155; }
.badge-free { background: #f1f5f9; color: #64748b; }
.badge-ai { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }

/* Forms & Inputs */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.form-label .req {
    color: var(--danger);
}

.form-control, .form-select, textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Stepper Wizard for 6-Step Registration */
.wizard-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.wizard-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    text-decoration: none;
}

.step-bubble {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step-item.active .step-bubble {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px var(--primary-light);
}

.step-item.completed .step-bubble {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.step-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.step-item.active .step-name {
    color: var(--primary);
}

/* Profile Card in Search / Catalog */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

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

.profile-card-img {
    position: relative;
    height: 220px;
    background: #e2e8f0;
    overflow: hidden;
}

.profile-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-img .ai-score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-card-img .ai-score-badge i {
    color: #a855f7;
}

.profile-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-card-sub {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.profile-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.profile-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1.5px solid var(--border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:hover td {
    background: #fdf2f4;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-backdrop.show {
    display: flex;
}

.modal-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s ease-out;
}

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

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0 20px 0;
    margin-top: auto;
    font-size: 0.88rem;
}

.footer h5 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer a {
    color: #cbd5e1;
}

.footer a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .app-layout { flex-direction: column; }
    .app-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .wizard-stepper { flex-wrap: wrap; gap: 12px; }
    .wizard-stepper::before { display: none; }
}
