/* ══════════════════════════════════════════
   style.css — Nyrox
   Dark cyber theme · Inter · Font Awesome
   مشترك بين index.html, login.html, dashboard.html
══════════════════════════════════════════ */

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Design tokens ─── */
:root {
    --bg: #08080d;
    --bg2: #0e0e17;
    --card: rgba(255, 255, 255, 0.035);
    --border: rgba(255, 255, 255, 0.07);
    --red: #e63946;
    --orange: #f4722b;
    --text: #ebebf0;
    --muted: #7a7a8c;
    --success: #4ade80;
    --error: #f87171;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 12px;
    --ease: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    display: block;
}
button {
    font-family: var(--font);
    cursor: pointer;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

/* ─── Utilities ─── */
.gradient-text {
    background: linear-gradient(135deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(230, 57, 70, 0.2);
    box-shadow: 0 8px 32px rgba(230, 57, 70, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all var(--ease);
    white-space: nowrap;
}
.btn:hover {
    transform: scale(1.02);
    opacity: 0.92;
}
.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.35);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(230, 57, 70, 0.35);
    color: var(--red);
}
.btn-outline:hover {
    background: rgba(230, 57, 70, 0.07);
    border-color: var(--red);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    color: var(--muted);
    border-radius: 4px;
    font-size: 13px;
    transition: color var(--ease), background var(--ease);
}
.btn-icon:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.btn-icon.danger:hover {
    color: var(--error);
    background: rgba(248, 113, 113, 0.08);
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
    display: block;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
}

/* ─── Ambient glow ─── */
.ambient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(230, 57, 70, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ─── Form controls (مشترك) ─── */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(230, 57, 70, 0.4);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-feedback {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
}
.form-feedback.success {
    display: flex;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--success);
}
.form-feedback.error {
    display: flex;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--error);
}

/* ══════════════════════════════════════════
   NAVBAR (index.html)
══════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(8, 8, 13, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--ease);
    position: relative;
}
.nav-link:hover {
    color: var(--text);
}
.nav-link.active {
    color: var(--text);
}
.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 2px;
}

.nav-cta {
    padding: 8px 20px;
    font-size: 13px;
}

/* ══════════════════════════════════════════
   HERO (index.html)
══════════════════════════════════════════ */
#home {
    padding: 80px 48px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 640px;
}

.hero-content h1 {
    font-size: clamp(42px, 5vw, 64px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.hero-content .hero-title {
    font-size: clamp(18px, 1.8vw, 22px);
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-content .hero-bio {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--muted);
    max-width: 540px;
    line-height: 1.8;
    margin-bottom: 28px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-visual {
    flex-shrink: 0;
}
.hero-avatar-wrap {
    position: relative;
    width: clamp(200px, 26vw, 320px);
    height: clamp(200px, 26vw, 320px);
}
.hero-avatar-wrap::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.25;
    filter: blur(30px);
}
.avatar-box {
    width: 100%;
    height: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.06);
    font-size: 72px;
}
.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Hero stats ─── */
.hero-stats {
    display: flex;
    gap: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.hero-stats .stat-item {
    display: flex;
    flex-direction: column;
}
.hero-stats .stat-number {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: var(--text);
}
.hero-stats .stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

/* ══════════════════════════════════════════
   SKILLS (index.html)
══════════════════════════════════════════ */
#skills {
    padding: 80px 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.skills-header {
    margin-bottom: 48px;
}
.skills-header h2 {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 900;
    letter-spacing: -0.025em;
}
.skills-header p {
    color: var(--muted);
    margin-top: 8px;
    font-size: 15px;
}

.skills-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
}
.bar-item .bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}
.bar-item .bar-header .pct {
    color: var(--red);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}
.bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--orange));
    border-radius: 999px;
    transition: width 1s ease;
}

/* ══════════════════════════════════════════
   SERVICES (index.html)
══════════════════════════════════════════ */
#services {
    padding: 80px 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-header {
    margin-bottom: 56px;
}
.section-header h2 {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 900;
    letter-spacing: -0.025em;
}
.section-header p {
    color: var(--muted);
    margin-top: 8px;
    font-size: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.service-card {
    padding: 28px 20px;
    text-align: center;
}
.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid rgba(230, 57, 70, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 20px;
}
.service-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.service-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ══════════════════════════════════════════
   WORK (index.html)
══════════════════════════════════════════ */
#work {
    padding: 80px 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.project-card {
    padding: 24px;
}
.project-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.project-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 14px;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.tag {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(230, 57, 70, 0.07);
    border: 1px solid rgba(230, 57, 70, 0.15);
    color: var(--red);
    font-weight: 500;
}
.project-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--ease);
}
.project-links a:hover {
    color: var(--text);
}
.project-links a i {
    color: var(--red);
}

/* ══════════════════════════════════════════
   CONTACT (index.html)
══════════════════════════════════════════ */
#contact {
    padding: 80px 48px 100px;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.contact-inner h2 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}
.contact-inner .sub {
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.7;
    font-size: 15px;
}
.contact-form {
    text-align: left;
}
.contact-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    padding: 14px;
    font-size: 15px;
}

/* ══════════════════════════════════════════
   FOOTER (index.html)
══════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg2);
    padding: 48px 48px 36px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
}
.footer-brand .logo-icon-sm {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}
.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    font-size: 13px;
    color: var(--muted);
    transition: color var(--ease);
}
.footer-links a:hover {
    color: var(--text);
}

/* ─── Social Links ─── */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.social-link {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 17px;
    transition: all var(--ease);
    background: rgba(255, 255, 255, 0.02);
}
.social-link:hover {
    color: #fff;
    border-color: rgba(230, 57, 70, 0.4);
    background: rgba(230, 57, 70, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.15);
}
.social-link.github:hover {
    border-color: #6e5494;
    background: rgba(110, 84, 148, 0.15);
}
.social-link.discord:hover {
    border-color: #5865F2;
    background: rgba(88, 101, 242, 0.15);
}
.social-link.instagram:hover {
    border-color: #E4405F;
    background: rgba(228, 64, 95, 0.15);
}
.social-link.email:hover {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}

.footer-copy {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.footer-built {
    font-size: 11px;
    color: var(--muted);
    opacity: 0.5;
    text-align: center;
}

/* ══════════════════════════════════════════
   LOGIN PAGE (login.html)
══════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(230, 57, 70, 0.08) 0%, transparent 70%);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 28px;
}
.auth-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.auth-card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.auth-card .auth-sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 28px;
}
.auth-card .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
    margin-top: 4px;
}
.auth-card .back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted);
    transition: color var(--ease);
}
.auth-card .back-link:hover {
    color: var(--text);
}

/* ══════════════════════════════════════════
   DASHBOARD (dashboard.html)
══════════════════════════════════════════ */
.dash-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* ─── Sidebar ─── */
.dash-sidebar {
    width: 240px;
    min-width: 200px;
    flex-shrink: 0;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
}

.dash-sidebar-header {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}
.dash-sidebar-header .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.dash-nav {
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
}
.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color var(--ease), background var(--ease);
    margin-bottom: 2px;
}
.dash-nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}
.dash-nav-item.active {
    color: var(--red);
    background: rgba(230, 57, 70, 0.09);
    font-weight: 600;
}
.dash-nav-item i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.dash-sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    flex-shrink: 0;
}
.dash-sidebar-footer strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
    word-break: break-all;
}
.dash-sidebar-footer .view-link {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    transition: color var(--ease);
}
.dash-sidebar-footer .view-link:hover {
    color: var(--text);
}

/* ─── Main Content ─── */
.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--bg);
}

.dash-topbar {
    height: 56px;
    min-height: 56px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    flex-shrink: 0;
    background: var(--bg2);
}
.dash-topbar h2 {
    font-size: 17px;
    font-weight: 700;
}

.dash-content-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* ─── Dashboard Cards ─── */
.dash-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.dash-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    padding: 60px;
    justify-content: center;
}

/* ─── Overview Tiles ─── */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.overview-tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.overview-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(230, 57, 70, 0.25);
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.08);
}
.overview-icon {
    font-size: 20px;
    color: var(--red);
    margin-bottom: 10px;
}
.overview-count {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.overview-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── CRUD ─── */
.crud-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.crud-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.crud-list-header h3 {
    margin: 0;
}
.crud-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 6px;
    font-size: 13px;
    transition: border-color var(--ease);
    gap: 8px;
}
.crud-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
.crud-item .item-name {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.crud-item-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.empty-state {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 30px 0;
}

/* ─── Dashboard Form ─── */
.dash-form .form-group {
    margin-bottom: 12px;
}
.dash-form .form-group label {
    font-size: 11px;
}
.dash-form .form-group input,
.dash-form .form-group textarea {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
}
.dash-form .form-group textarea {
    min-height: 60px;
}

/* ─── Messages ─── */
.messages-header {
    margin-bottom: 14px;
}
.messages-header h3 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.message-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color var(--ease), background var(--ease);
}
.message-item.unread {
    border-color: rgba(230, 57, 70, 0.3);
    background: rgba(230, 57, 70, 0.03);
}
.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}
.message-name {
    font-weight: 700;
    display: flex;
    align-items: center;
}
.message-email {
    color: var(--muted);
}
.message-email:hover {
    color: var(--text);
}
.message-date {
    color: var(--muted);
    margin-left: auto;
    font-size: 11px;
}
.message-body {
    font-size: 13px;
    color: var(--muted);
    white-space: pre-wrap;
    margin-bottom: 10px;
    line-height: 1.6;
}
.message-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   RESPONSIVE (جميع الصفحات)
══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .navbar {
        padding: 0 24px;
    }
    .nav-links {
        display: none;
    }
    #home {
        padding: 60px 24px 30px;
    }
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-visual {
        order: -1;
    }
    .hero-content .hero-bio {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-stats {
        justify-content: center;
        gap: 24px;
        flex-wrap: wrap;
    }
    .hero-stats .stat-item {
        align-items: center;
    }
    .skills-bars {
        grid-template-columns: 1fr;
    }
    #services {
        padding: 60px 24px;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #work {
        padding: 60px 24px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    #contact {
        padding: 60px 24px 80px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .footer {
        padding: 40px 24px 30px;
    }
    .footer-links {
        gap: 18px;
    }
    .social-links {
        gap: 10px;
    }
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    /* Dashboard responsive */
    .dash-sidebar {
        width: 100%;
        min-width: unset;
        height: auto;
        max-height: 60vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .dash-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .dash-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 2px;
    }
    .dash-nav-item {
        width: auto;
        flex: 1 1 auto;
        justify-content: center;
        padding: 6px 10px;
        font-size: 12px;
    }
    .dash-nav-item i {
        width: 14px;
    }
    .dash-sidebar-header {
        padding: 12px 16px;
        font-size: 14px;
    }
    .dash-sidebar-footer {
        display: none;
    }
    .dash-topbar {
        padding: 0 16px;
        height: 48px;
        min-height: 48px;
    }
    .dash-topbar h2 {
        font-size: 15px;
    }
    .dash-content-wrap {
        padding: 16px;
    }
    .crud-layout {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .message-meta {
        flex-wrap: wrap;
    }
    .message-date {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* General */
    .services-grid {
        grid-template-columns: 1fr;
    }
    .hero-avatar-wrap {
        width: 180px;
        height: 180px;
    }
    .nav-cta {
        padding: 6px 14px;
        font-size: 12px;
    }
    .hero-stats {
        gap: 16px;
    }
    .hero-stats .stat-number {
        font-size: 17px;
    }
    .social-links {
        gap: 8px;
    }
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    /* Login */
    .auth-card {
        padding: 28px 20px;
    }
    .auth-card h2 {
        font-size: 19px;
    }
    .auth-logo {
        font-size: 17px;
        margin-bottom: 20px;
    }
    .auth-logo .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    /* Dashboard */
    .dash-sidebar {
        max-height: 50vh;
    }
    .dash-nav-item {
        font-size: 11px;
        padding: 4px 8px;
    }
    .dash-nav-item i {
        font-size: 12px;
    }
    .dash-content-wrap {
        padding: 12px;
    }
    .dash-card {
        padding: 16px;
    }
    .overview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .overview-tile {
        padding: 14px 10px;
    }
    .overview-count {
        font-size: 22px;
    }
    .overview-label {
        font-size: 9px;
    }
    .crud-item {
        font-size: 12px;
        padding: 6px 10px;
    }
    .message-item {
        padding: 10px 12px;
    }
}