/* vyvmedia - PHP version - Modern Design System */
:root {
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --foreground: #0f172a;
    --muted: #64748b;
    --border: rgba(226, 232, 240, 0.4);
    --background: #ffffff;
    --card: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --neon-shadow: 0 0 20px var(--primary-glow);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Outfit', 'Cairo', sans-serif;
    color: var(--foreground);
    background: #f8fafc;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

section {
    scroll-margin-top: 100px;
}

[dir="rtl"] {
    font-family: 'Cairo', 'Outfit', sans-serif;
}

a {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    line-height: 1.15;
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.float {
    animation: float 5s ease-in-out infinite;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.6);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px -10px rgba(59, 130, 246, 0.7);
    filter: brightness(1.1);
}

.btn-outline {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--foreground);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Icons */
.lucide {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-inline {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    transition: all 0.4s ease;
}

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

.logo-link,
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--foreground);
    letter-spacing: -0.03em;
    text-decoration: none;
}

.logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.logo span {
    line-height: 1;
}

.logo-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.nav-desktop {
    display: none;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-desktop a {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

.nav-desktop a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.3s;
}

@media (min-width: 992px) {
    .menu-toggle {
        display: none;
    }
}

.btn-cta {
    display: none;
}

@media (min-width: 992px) {
    .btn-cta {
        display: inline-flex;
    }
}

.nav-mobile {
    display: none;
    padding: 2rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 1.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    box-shadow: var(--shadow-lg);
}

.nav-mobile.open {
    display: flex;
    animation: fadeInUp 0.4s ease;
}

.nav-mobile a {
    color: var(--muted);
    font-weight: 700;
    font-size: 1.1rem;
}

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

/* Hero */
.hero {
    padding: 2rem 0 2rem;
    /* Was 8rem 0 4rem - drastically reduced */
    background:
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.08), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(45, 212, 191, 0.08), transparent 40%);
}

.hero-grid {
    display: grid;
    gap: 3rem;
    /* Was 5rem */
    align-items: center;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    /* Was 1.5rem */
    line-height: 1.05;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    /* Slightly reduced padding */
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-size: 0.85rem;
    /* Was 0.9rem */
    font-weight: 800;
    margin-bottom: 1.5rem;
    /* Was 2rem */
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.hero-desc {
    font-size: 1.2rem;
    /* Was 1.25rem */
    color: var(--muted);
    margin-bottom: 2rem;
    /* Was 3rem */
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    /* Was 1.5rem */
}

/* Sections */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem;
    /* Was 5rem */
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    /* Was 1.25rem */
}

.section-desc {
    font-size: 1.1rem;
    /* Was 1.15rem */
    color: var(--muted);
}

/* About */
.about {
    padding: 1rem 0 1rem;
    /* Was 6rem 0 - Reduced bottom padding */
}

/* Technologies */
.technologies {
    padding: 1rem 0 1rem;
}

.technologies .section-header {
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    gap: 2rem;
    /* Was 3rem */
    margin-top: 3rem;
    /* Was 5rem */
}

@media (min-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: #fff;
    padding: 2rem;
    /* Was 3rem */
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-card .service-icon {
    margin-bottom: 1rem;
    /* Was 1.5rem */
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    /* Was 1rem */
    font-size: 1.35rem;
    /* Was 1.5rem */
}

/* Stats */
.stats {
    padding: 1rem 0;
    /* Was 4rem 0 */
    margin-top: -3rem;
    /* Was -4rem */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Was 240px */
    gap: 1.5rem;
    /* Was 2.5rem */
}

.stat-card {
    background: #fff;
    padding: 2rem;
    /* Was 3rem */
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-value {
    display: block;
    font-size: 3rem;
    /* Was 3.5rem */
    font-weight: 900;
    margin-bottom: 0.25rem;
    /* Was 0.5rem */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Services */
.services-grid {
    display: grid;
    gap: 2rem;
    /* Was 2.5rem */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Was 320px */
}

.service-card {
    background: #fff;
    padding: 2.5rem;
    /* Was 3.5rem */
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 60px -15px rgba(59, 130, 246, 0.15);
    border-color: transparent;
}

.service-icon {
    width: 3.5rem;
    /* Was 4.5rem */
    height: 3.5rem;
    /* Was 4.5rem */
    background: #f1f5f9;
    color: var(--primary);
    border-radius: 1rem;
    /* Was 1.5rem */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    /* Was 2rem */
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-gradient);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    /* Was 1.75rem */
    margin-bottom: 0.75rem;
    /* Was 1rem */
}

/* Contact */
.contact {
    padding: 1rem 0;
    /* Was 10rem 0 */
}

.contact-grid {
    display: grid;
    gap: 4rem;
    /* Was 6rem */
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 1.2fr;
        align-items: stretch;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Was 2rem */
    background: rgba(255, 255, 255, 0.5);
    padding: 2.5rem;
    /* Was 4rem */
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.info-item {
    display: flex;
    gap: 1rem;
    /* Was 1.5rem */
    align-items: flex-start;
}

.info-icon {
    width: 3.5rem;
    /* Was 4rem */
    height: 3.5rem;
    /* Was 4rem */
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    /* Was 1.25rem */
}

.info-text h4 {
    font-size: 1.1rem;
    /* Was 1.25rem */
    margin-bottom: 0.25rem;
    /* Was 0.5rem */
}

.info-text p {
    color: var(--muted);
    font-size: 1rem;
    /* Was 1.1rem */
}

.contact-form-wrap {
    background: #fff;
    padding: 2.5rem;
    /* Was 4rem */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.contact-form-wrap h3 {
    margin-bottom: 2rem;
    /* Was 3.5rem */
    font-size: 1.5rem;
    /* Was 1.75rem */
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    /* Was 1.25rem 1.5rem */
    font-size: 0.95rem;
    /* Was 1rem */
    border-radius: var(--radius-md);
    width: 100%;
    margin-bottom: 1rem;
    /* Was 1.25rem */
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Footer */
.site-footer {
    padding: 1rem 0 1rem;
    /* Was 8rem 0 3rem */
    background: #fff;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    gap: 3rem;
    /* Was 4rem */
    margin-bottom: 3rem;
    /* Was 6rem */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Was 280px */
}

.footer-brand .logo-link {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--foreground);
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}

/* Utils */
.site-main {
    padding-top: 6rem;
    /* Adjusted to account for fixed header + small buffer */
}

.alert {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Admin Dashboard Overhaul */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
    font-family: 'Cairo', 'Outfit', sans-serif;
}

.admin-sidebar {
    width: 280px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 1;
    z-index: 100;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand span {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-nav a .lucide {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 99px;
    margin-right: auto;
    font-weight: 800;
}

/* Technologies Section */
.technologies {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.03));
}

.technologies-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 3rem;
    max-width: 1000px;
    margin: 3rem auto 0;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    width: 90px;
}

.tech-item:hover {
    transform: translateY(-5px);
}

.tech-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    /* Removed grayscale to show original colors immediately */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    background: #fff;
    border-radius: 1rem;
    padding: 10px;
    /* Reduced padding for larger icon */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.tech-item:hover .tech-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 10px 15px rgba(59, 130, 246, 0.15));
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tech-name {
    font-weight: 700;
    color: var(--muted);
    font-size: 1rem;
    transition: color 0.3s ease;
    text-align: center;
}

.tech-item:hover .tech-name {
    color: var(--primary);
}

@media (max-width: 768px) {
    .technologies-grid {
        gap: 2rem;
    }

    .tech-icon {
        width: 60px;
        height: 60px;
    }
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    border: 2px solid var(--primary);
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
}

.logout-link {
    color: #64748b;
    transition: color 0.3s;
}

.logout-link:hover {
    color: #ef4444;
}

/* Main Content */
.admin-main {
    margin-right: 280px;
    flex: 1;
    padding: 2.5rem;
    min-width: 0;
    transition: margin-right 0.3s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

/* Dashboard Cards */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header h3 .lucide {
    color: var(--primary);
    width: 1.25rem;
}

/* Stats Grid */
/* .stats-grid already defined in main site, we override/extend for admin */
.admin-content .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-icon.blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.unread-row {
    background: rgba(37, 99, 235, 0.02);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-meta span {
    font-size: 0.85rem;
    color: #64748b;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    background: #fff;
}

.btn-icon:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #ef4444;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 18px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
}

.form-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    min-width: 150px;
}

/* Message View */
.msg-content {
    padding: 2.5rem;
}

.msg-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.meta-item label {
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item label i {
    width: 16px;
    color: var(--primary);
}

.msg-body-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.message-text {
    line-height: 1.8;
    color: #334155;
    white-space: pre-wrap;
    margin-top: 1rem;
}

/* Portfolio Specifics */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 3.5rem;
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .filter-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--foreground);
}

.filter-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.portfolio-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.portfolio-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary-soft);
    border-radius: 4px;
}

.portfolio-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.portfolio-card:hover h3 {
    color: var(--primary);
}

.portfolio-content p {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    height: 3.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* CMS Section */
.cms-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cms-sidebar {
    width: 240px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.cms-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cms-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cms-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.cms-nav a:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.cms-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.cms-nav a .lucide {
    width: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.cms-nav a.active .lucide {
    opacity: 1;
}

.cms-editor {
    flex: 1;
}

.list-item-row input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    width: 100%;
}

.section-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--foreground);
    transition: all 0.3s;
}

.section-link:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.section-link .lucide {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.message-text {
    line-height: 1.8;
    color: #334155;
    white-space: pre-wrap;
    margin-top: 1rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--foreground);
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.link-arrow .lucide {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s;
}

.link-arrow:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.link-arrow:hover .lucide {
    transform: translateX(-5px);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.empty-state .lucide {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Admin Form Styles */
.settings-form {
    padding: 2.5rem;
}

.form-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group-icon {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group-icon label {
    font-weight: 800;
    font-size: 0.95rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-icon label i {
    width: 1.1rem;
    color: var(--primary);
}

.form-group-icon input,
.form-group-icon textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group-icon input:focus,
.form-group-icon textarea:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.list-item-row {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.list-item-row:hover {
    border-color: var(--primary-soft);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

/* Admin Utility Buttons */
.btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-icon i,
.btn-icon .lucide {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

.btn-sm {
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* Premium Admin Buttons */
.btn-site-preview {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-site-preview:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-site-preview i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.btn-save-cms {
    background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-save-cms:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.35);
    filter: brightness(1.1);
}

.btn-save-cms i {
    width: 22px;
    height: 22px;
    stroke-width: 2.2px;
}

/* Alerts & Notifications */
.alert {
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert i {
    width: 22px;
    height: 22px;
    stroke-width: 2.5px;
}

/* Logo Preview in Settings */
.logo-preview-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f1f5f9;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.preview-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-label i {
    width: 16px;
    height: 16px;
}

.logo-display-card {
    position: relative;
    background: #fff;
    background-image: linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.logo-display-card img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.btn-remove-logo {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 28px;
    height: 28px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.btn-remove-logo:hover {
    transform: scale(1.15) rotate(90deg);
    background: #dc2626;
}

.btn-remove-logo i {
    width: 14px;
    height: 14px;
    stroke-width: 3px;
}

/* Page Hero (Portfolio, etc) */
.page-hero {
    padding: 12rem 0 6rem;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
    text-align: center;
}

.page-hero .badge {
    margin-bottom: 2rem;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.page-hero .hero-desc {
    margin: 0 auto;
}

.portfolio-section {
    padding: 4rem 0 10rem;
}

/* Mobile Responsiveness for Admin Panel */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #0f172a;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(4px);
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        right: 0;
        left: auto;
    }

    .sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-overlay {
        display: block;
    }

    .admin-main {
        margin-right: 0 !important;
        padding: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .header-actions {
        width: 100%;
    }

    .btn-site-preview {
        width: 100%;
        justify-content: center;
    }

    .admin-content .stats-grid {
        grid-template-columns: 1fr;
    }

    .msg-meta-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .cms-container {
        flex-direction: column;
    }

    .cms-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .card-header .btn {
        width: 100%;
    }

    /* Toolbar stacking */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .toolbar .search-box {
        width: 100%;
    }

    .toolbar .form-select {
        width: 100%;
    }

    .toolbar .btn {
        width: 100%;
    }

    /* Message Detail Optimization */
    .msg-content {
        padding: 1.5rem;
    }

    .msg-meta-grid {
        gap: 1rem;
    }

    .meta-item {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-item label {
        margin-bottom: 0.25rem;
    }

    .msg-body-box {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    /* Enhanced unread row in mobile view */
    .table tr.unread-row {
        border-right: 4px solid var(--primary);
        background: #f0f7ff;
    }
}

@media (max-width: 768px) {
    .card-header.sticky-header {
        position: static !important;
    }

    .table-responsive {
        border: 0;
    }

    .table thead {
        display: none;
    }

    .table tr {
        display: block;
        margin-bottom: 1.5rem;
        background: #f8fafc;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1rem;
    }

    .table td {
        display: block;
        text-align: left;
        padding: 0.5rem 0;
        border: none;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 800;
        display: block;
        font-size: 0.75rem;
        color: var(--muted);
        margin-bottom: 0.25rem;
    }

    .actions-cell {
        justify-content: flex-start;
        margin-top: 1rem;
        padding-top: 1rem !important;
        border-top: 1px solid var(--border) !important;
    }
}