/* ============================================
   NIKHIL PORTFOLIO - MAIN STYLESHEET
   ============================================ */

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary: #f64f59;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --card-bg: #ffffff;
    --text-muted: #6c757d;
    --sidebar-width: 260px;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* ============ BASE ============ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ============ NAVBAR - PUBLIC ============ */
.public-navbar {
    background: rgba(26, 26, 46, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(108, 99, 255, 0.3);
    padding: 15px 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.public-navbar .navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -0.5px;
}
.public-navbar .navbar-brand span { color: var(--primary); }
.public-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 6px;
    transition: all 0.2s;
}
.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(108, 99, 255, 0.2);
}
.public-navbar .btn-portal {
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
    padding: 8px 20px !important;
    font-weight: 600;
}
.public-navbar .btn-portal:hover { background: var(--primary-dark); }

/* ============ HERO ============ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 60%, #16213e 100%);
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(246,79,89,0.1) 0%, transparent 70%);
    bottom: 50px; left: 100px;
    border-radius: 50%;
}
.hero-badge {
    display: inline-block;
    background: rgba(108,99,255,0.2);
    color: var(--primary);
    border: 1px solid rgba(108,99,255,0.4);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 35px;
}
.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}
.hero-stat { text-align: center; }
.hero-stat .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.hero-stat .label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-avatar {
    width: 380px; height: 380px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 8rem;
    box-shadow: 0 20px 60px rgba(108,99,255,0.4);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-avatar-img {
    width: 320px;
    height: 320px;
    max-width: 100%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 20px 60px rgba(99,102,241,0.3);
}

/* ============ SECTION STYLES ============ */
.section-padding { padding: 90px 0; }
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 50px;
}
.section-divider {
    width: 60px; height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
    margin: 12px 0 20px;
}

/* ============ SKILL BADGES ============ */
.skill-badge {
    display: inline-block;
    background: #fff;
    border: 2px solid #e9ecef;
    color: var(--dark);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 5px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.skill-badge:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108,99,255,0.15);
}

/* ============ SERVICE CARDS ============ */
.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(108,99,255,0.12);
    border-color: var(--primary);
}
.service-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(108,99,255,0.3);
}
.service-card h4 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

/* ============ TESTIMONIAL CARDS ============ */
.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
    height: 100%;
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.testimonial-stars { color: #ffc107; margin-bottom: 15px; }
.testimonial-avatar {
    width: 55px; height: 55px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ============ BTN STYLES ============ */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary-custom:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,99,255,0.35);
}
.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff;
}

/* ============ FOOTER ============ */
.public-footer {
    background: var(--darker);
    color: rgba(255,255,255,0.6);
    padding: 50px 0 20px;
    border-top: 1px solid rgba(108,99,255,0.2);
}
.public-footer h5 { color: #fff; font-weight: 700; }
.public-footer a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.public-footer a:hover { color: var(--primary); }
.footer-social a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 8px;
    transition: all 0.2s;
}
.footer-social a:hover { background: var(--primary); color: #fff; }

/* ============ ADMIN LAYOUT ============ */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s;
}
.sidebar-brand {
    padding: 20px 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-brand span { color: var(--primary); }
.sidebar-section-title {
    padding: 18px 20px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.7);
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
    color: #fff;
    background: rgba(108,99,255,0.15);
    border-left-color: var(--primary);
}
.sidebar-nav a.active {
    color: #fff;
    background: rgba(108,99,255,0.2);
    border-left-color: var(--primary);
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: 1rem; }
.sidebar-user {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: var(--dark);
}
.sidebar-user-avatar {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.sidebar-user-info .name { font-size: 0.88rem; font-weight: 600; color: #fff; }
.sidebar-user-info .role { font-size: 0.75rem; color: rgba(255,255,255,0.4); }

.admin-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-topbar {
    background: #fff;
    padding: 15px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.admin-topbar .page-title { font-size: 1.25rem; font-weight: 700; color: var(--dark); }
.admin-main { padding: 30px; flex: 1; }

/* ============ STAT CARDS ============ */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(0,0,0,0.08); }
.stat-card .stat-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.stat-icon-primary { background: rgba(108,99,255,0.12); color: var(--primary); }
.stat-icon-success { background: rgba(40,167,69,0.12); color: var(--success); }
.stat-icon-warning { background: rgba(255,193,7,0.12); color: #d39e00; }
.stat-icon-danger { background: rgba(220,53,69,0.12); color: var(--danger); }
.stat-icon-info { background: rgba(23,162,184,0.12); color: var(--info); }
.stat-icon-secondary { background: rgba(246,79,89,0.12); color: var(--secondary); }

/* ============ DATA TABLE ============ */
.data-table-wrapper {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}
.data-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.data-table-header h5 { font-weight: 700; margin: 0; color: var(--dark); }
.table { margin: 0; }
.table thead th {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 16px;
}
.table tbody td { padding: 14px 16px; vertical-align: middle; border-color: #f0f0f0; }
.table tbody tr:hover { background: #fafafa; }

/* ============ STATUS BADGES ============ */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-pending { background: #fff3cd; color: #856404; }
.badge-inprogress { background: #cce5ff; color: #004085; }
.badge-testing { background: #d4edda; color: #155724; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-paid { background: #d4edda; color: #155724; }
.badge-overdue { background: #f8d7da; color: #721c24; }

/* ============ PROGRESS BAR ============ */
.progress-thin { height: 6px; border-radius: 3px; }
.progress-bar-primary { background: var(--primary); }

/* ============ FORM CARD ============ */
.form-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}
.form-control, .form-select {
    border: 1.5px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    transition: all 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
.form-label { font-weight: 600; font-size: 0.88rem; color: #555; margin-bottom: 6px; }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; max-width: calc(100vw - 40px); }
.toast-custom {
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-left: 4px solid var(--primary);
    min-width: 280px;
    font-weight: 500;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

/* ============ CLIENT PORTAL ============ */
.portal-sidebar {
    width: 250px;
    background: var(--dark);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
}
.portal-content { margin-left: 250px; }

/* ============ SIDEBAR OVERLAY (mobile backdrop) ============ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    cursor: pointer;
}
.sidebar-overlay.show { display: block; }

/* ============ RESPONSIVE — tablet (≤991px) ============ */
@media (max-width: 991px) {
    .hero-title { font-size: 2.5rem; }
    .hero-avatar { width: 260px; height: 260px; font-size: 5rem; }
    .hero-avatar-img { width: 220px; height: 220px; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .admin-sidebar { transform: translateX(-100%); z-index: 200; }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
    .portal-sidebar { transform: translateX(-100%); }
    .portal-content { margin-left: 0; }
}

/* ============ RESPONSIVE — phone (≤767px) ============ */
@media (max-width: 767px) {
    .section-padding { padding: 60px 0; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-avatar { width: 200px; height: 200px; font-size: 4rem; }
    .hero-avatar-img { width: 176px; height: 176px; }
    .hero-stats { gap: 15px; }
    .hero-stat .number { font-size: 1.6rem; }
    .section-title { font-size: 1.8rem; }
    .data-table-header { flex-direction: column; align-items: flex-start; }
}

/* ============ RESPONSIVE — small phone (≤575px) ============ */
@media (max-width: 575px) {
    .hero-title { font-size: 1.75rem; }
    .hero-avatar { width: 170px; height: 170px; font-size: 3.5rem; }
    .hero-avatar-img { width: 150px; height: 150px; }
    .hero-stats { justify-content: space-between; }
    .hero-stat { flex: 1 1 40%; text-align: center; }
    .section-padding { padding: 50px 0; }
    .section-title { font-size: 1.6rem; }
    .btn-primary-custom, .btn-outline-custom { width: 100%; justify-content: center; }
    .toast-container { top: 10px; right: 10px; left: 10px; max-width: 100%; }
    .toast-custom { min-width: unset; width: 100%; }
    .admin-topbar { padding: 12px 16px; }
    .admin-main { padding: 16px; }
}

/* ============ INVOICE PRINT ============ */
@media print {
    .no-print { display: none !important; }
    body { background: white; }
    .invoice-print-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }

/* ============ MISC ============ */
.page-header {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h2 { font-weight: 800; color: var(--dark); margin: 0; }
.breadcrumb-item a { color: var(--primary); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 15px; opacity: 0.3; }
