/* ============================================
   أدوات علوم سوريا - Main Stylesheet v3.0
   منصة أدوات علوم سوريا
   Mobile-First, RTL, Light Theme
   Royal Green + Sandy Gold + White BG + Black Text
   Font: Noto Kufi Arabic
   ============================================ */

/* === Google Fonts - loaded via <link> in header.php === */

/* === CSS Variables === */
:root {
    /* Brand Palette */
    --royal-green: #006B3F;
    --royal-green-light: #008B52;
    --royal-green-dark: #004D2C;
    --sandy-gold: #C49A3C;
    --sandy-gold-light: #D4AD5A;
    --sandy-gold-dark: #A07E2E;

    /* Core Theme - Light */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6f8;
    --bg-tertiary: #eef0f3;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-input: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.92);

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #8a8a8a;
    --text-bright: #000000;
    --heading-color: #C49A3C;

    --accent: #006B3F;
    --accent-hover: #008B52;
    --accent-light: rgba(0, 107, 63, 0.08);
    --accent-glow: rgba(0, 107, 63, 0.15);

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(0, 107, 63, 0.25);

    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(0, 107, 63, 0.1);

    --header-height: 60px;
    --bottom-nav-height: 68px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    --font: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

::selection {
    background: var(--accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

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

/* === App Header === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-flag {
    flex-shrink: 0;
}

.logo-text {
    color: var(--text-bright);
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.logo-sur {
    color: var(--royal-green);
}

.logo-dot {
    color: var(--sandy-gold);
    font-size: 1.3em;
    line-height: 0.8;
}

.logo-tools {
    color: var(--text-bright);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 1.1em;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
}

.nav-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--border-accent);
}

.nav-btn .nav-label {
    font-size: 0.8em;
    font-weight: 500;
    display: none;
}

@media (min-width: 768px) {
    .nav-btn .nav-label { display: inline; }
}

/* === Main Content === */
.app-main {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: calc(var(--bottom-nav-height) + 24px);
    padding-left: 16px;
    padding-right: 16px;
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
}

/* === Side Menu === */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.side-menu.open {
    pointer-events: all;
    opacity: 1;
}

.side-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(4px);
}

.side-menu-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
}

.side-menu.open .side-menu-content {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0,107,63,0.06), rgba(196,154,60,0.04));
}

.side-menu-header h3 {
    color: var(--text-bright);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-menu {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.close-menu:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.side-menu-links {
    padding: 12px;
}

.side-menu-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 0.93em;
    font-weight: 500;
}

.side-menu-links a:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateX(-4px);
}

.side-menu-links .menu-divider {
    border-top: 1px solid var(--border);
    margin: 8px 16px;
}

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -1px 3px rgba(0,0,0,0.04);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7em;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    font-family: var(--font);
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--accent);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-icon {
    font-size: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-label { font-size: 1em; font-weight: 500; }

.bottom-nav-add {
    position: relative;
}

.bottom-nav-add .bottom-nav-icon {
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-light));
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    margin-top: -20px;
    box-shadow: 0 4px 16px rgba(0, 107, 63, 0.3);
    transition: transform var(--transition), box-shadow var(--transition);
}

.bottom-nav-add:hover .bottom-nav-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(0, 107, 63, 0.4);
}

/* === Hero Section (Homepage) === */
.hero-section {
    text-align: center;
    padding: 36px 16px 28px;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.hero-flag {
    margin: 0 auto 16px;
    display: flex;
    justify-content: center;
}

.hero-title {
    font-size: 1.9em;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.hero-title .green { color: var(--royal-green); }
.hero-title .red { color: var(--sandy-gold); }

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.95em;
    max-width: 500px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--royal-green);
}

.hero-stat-label {
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: 500;
}

/* === Section Headers === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .accent-bar {
    width: 4px;
    height: 20px;
    background: var(--sandy-gold);
    border-radius: 2px;
}

/* === Cards Grid === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 4px 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px 14px 18px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--royal-green), var(--sandy-gold));
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}

.card:hover::before {
    opacity: 1;
}

.card:active {
    transform: translateY(-2px);
}

.card-emoji {
    font-size: 2.6em;
    line-height: 1;
}

.card-name {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.card-count {
    font-size: 0.73em;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.card-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    margin: -22px -14px 0;
    width: calc(100% + 28px);
}

/* === Page Header === */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 4px;
}

/* === Breadcrumb === */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.83em;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-current { color: var(--accent); font-weight: 600; }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.5; }

/* === Tool List === */
.tool-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.tool-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateX(-4px);
    box-shadow: var(--shadow);
}

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-light), rgba(196,154,60,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-title {
    font-weight: 700;
    font-size: 0.93em;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-bright);
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.78em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.72em;
    color: var(--text-muted);
    font-weight: 500;
}

.tool-arrow {
    color: var(--text-muted);
    font-size: 1.2em;
    transition: transform var(--transition);
}

.tool-item:hover .tool-arrow {
    transform: translateX(-4px);
    color: var(--accent);
}

/* === Tool View Page === */
.tool-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

.tool-top-bar {
    height: 52px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
}

.tool-top-bar .back-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}

.tool-top-bar .back-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--border-accent);
}

.tool-top-bar .tool-name {
    flex: 1;
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-bright);
}

.tool-frame-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.tool-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.tool-footer {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
}

.tool-footer-user {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--transition);
}

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

.tool-footer-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,107,63,0.2);
}

.tool-footer-actions {
    display: flex;
    gap: 6px;
}

.tool-action-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition);
    text-decoration: none;
    font-family: var(--font);
}

.tool-action-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}

/* === Share Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--transition);
    padding: 24px;
    border-top: 1px solid var(--border);
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--heading-color);
}

.modal-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.85em;
    font-weight: 500;
    transition: all var(--transition);
    font-family: var(--font);
}

.share-btn:hover {
    background: var(--accent-light);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.share-btn .icon { font-size: 1.8em; }

/* === Profile Page === */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(135deg,
        rgba(0,107,63,0.08),
        rgba(196,154,60,0.05));
    pointer-events: none;
}

.profile-header {
    text-align: center;
    padding: 24px 0;
    position: relative;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 auto 14px;
    box-shadow: 0 4px 16px rgba(0,107,63,0.2);
    border: 4px solid var(--bg-primary);
    position: relative;
    z-index: 1;
}

.profile-name {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--heading-color);
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 8px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.profile-rank {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 12px;
    border: 1px solid var(--border-accent);
}

.profile-support {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 500;
}

.support-btn:hover {
    background: var(--accent-light);
    border-color: var(--border-accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.profile-qr {
    max-width: 180px;
    margin: 16px auto;
    border-radius: var(--radius);
    border: 2px solid var(--border);
}

/* === Comments Section === */
.comments-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.comments-section h2 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.88em;
    color: var(--text-bright);
}

.comment-date {
    font-size: 0.75em;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.7;
}

.comment-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* === Forms === */
.form-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    max-width: 520px;
    margin: 0 auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form-title {
    font-size: 1.3em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: var(--heading-color);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.88em;
    color: var(--text-secondary);
    margin-bottom: 7px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95em;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.code-editor {
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
    min-height: 350px;
    direction: ltr;
    text-align: left;
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
    line-height: 1.7;
    font-size: 0.85em;
    background: #1e1e2e;
    color: #cdd6f4;
    border: 2px solid #45475a;
    border-radius: 8px;
    padding: 16px;
    resize: vertical;
}

.code-editor:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 107, 63, 0.15);
    outline: none;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238a8a8a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    padding-left: 36px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-light));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(0,107,63,0.3);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, var(--sandy-gold), var(--sandy-gold-light));
    color: #fff;
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85em; border-radius: var(--radius-sm); }
.btn-xs { padding: 5px 10px; font-size: 0.75em; border-radius: 6px; }

/* === Flash Messages / Alerts === */
.flash-message {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9em;
    font-weight: 500;
    animation: slideDown 0.4s ease;
    text-align: center;
    color: #fff;
}

.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9em;
    font-weight: 500;
    animation: slideDown 0.4s ease;
    border: 1px solid;
}

.alert-success {
    background: rgba(16,185,129,0.08);
    color: #065f46;
    border-color: rgba(16,185,129,0.2);
}

.alert-danger {
    background: rgba(239,68,68,0.08);
    color: #991b1b;
    border-color: rgba(239,68,68,0.2);
}

.alert-warning {
    background: rgba(245,158,11,0.08);
    color: #92400e;
    border-color: rgba(245,158,11,0.2);
}

.alert-info {
    background: rgba(59,130,246,0.08);
    color: #1e40af;
    border-color: rgba(59,130,246,0.2);
}

@keyframes slideDown {
    from { transform: translateY(-16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}

.page-link:hover, .page-link.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* === Tables (Admin) === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.data-table th, .data-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    font-size: 0.9em;
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

/* === Status Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.73em;
    font-weight: 600;
    gap: 4px;
}

.badge-pending { background: rgba(245,158,11,0.1); color: #92400e; border: 1px solid rgba(245,158,11,0.2); }
.badge-approved { background: rgba(16,185,129,0.1); color: #065f46; border: 1px solid rgba(16,185,129,0.2); }
.badge-rejected { background: rgba(239,68,68,0.1); color: #991b1b; border: 1px solid rgba(239,68,68,0.2); }
.badge-active { background: rgba(16,185,129,0.1); color: #065f46; border: 1px solid rgba(16,185,129,0.2); }
.badge-expired { background: rgba(100,100,100,0.1); color: #555; border: 1px solid rgba(100,100,100,0.15); }
.badge-banned { background: rgba(239,68,68,0.1); color: #991b1b; border: 1px solid rgba(239,68,68,0.2); }
.badge-published { background: rgba(16,185,129,0.1); color: #065f46; border: 1px solid rgba(16,185,129,0.2); }
.badge-draft { background: rgba(100,100,100,0.1); color: #555; border: 1px solid rgba(100,100,100,0.15); }

/* === Stats Cards (Dashboard) === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--royal-green), var(--sandy-gold));
    opacity: 0.6;
}

.stat-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.78em;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stat-icon {
    font-size: 1.5em;
    margin-bottom: 6px;
    display: block;
}

/* === Search === */
.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.93em;
    font-family: var(--font);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 52px 24px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3.5em;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
}

.empty-state p {
    font-size: 0.9em;
    max-width: 300px;
    margin: 0 auto;
}

/* === Admin Layout === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition);
    box-shadow: -2px 0 8px rgba(0,0,0,0.04);
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    background: linear-gradient(135deg, rgba(0,107,63,0.06), rgba(196,154,60,0.04));
}

.admin-sidebar-header h2 {
    color: var(--text-bright);
    font-size: 1.15em;
    font-weight: 700;
}

.admin-sidebar-header small {
    color: var(--text-muted);
    font-size: 0.8em;
}

.admin-nav { padding: 12px; }

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 0.88em;
    font-weight: 500;
    margin-bottom: 2px;
}

.admin-nav a:hover, .admin-nav a.active {
    background: var(--accent-light);
    color: var(--accent);
}

.admin-nav a.active {
    border-right: 3px solid var(--accent);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    margin-right: 250px;
    padding: 24px;
    max-width: 1100px;
}

/* === AI Panel === */
.ai-panel {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-top: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.ai-panel h3 {
    color: var(--heading-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.ai-result {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: var(--radius);
    padding: 18px;
    margin-top: 12px;
    font-size: 0.88em;
    line-height: 1.8;
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #45475a;
}

/* === Loading === */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === About Page === */
.about-hero {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    background-image: linear-gradient(135deg, rgba(0,107,63,0.04), rgba(196,154,60,0.03));
}

.about-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.about-section h2 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-section p, .about-section li {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.8;
}

.about-section ul {
    list-style: none;
    padding: 0;
}

.about-section ul li {
    padding: 6px 0;
    padding-right: 20px;
    position: relative;
}

.about-section ul li::before {
    content: '✦';
    position: absolute;
    right: 0;
    color: var(--sandy-gold);
    font-size: 0.7em;
}

.about-flag-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
}

.about-flag-bar .green { flex: 1; background: var(--royal-green); }
.about-flag-bar .white { flex: 1; background: #e0e0e0; }
.about-flag-bar .black { flex: 1; background: #1a1a1a; }

/* === Custom Pages === */
.custom-page-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
    font-size: 1em;
    color: var(--text-primary);
}

.custom-page-content h1,
.custom-page-content h2,
.custom-page-content h3 {
    color: var(--heading-color);
    margin-bottom: 12px;
}

.custom-page-content img {
    max-width: 100%;
    border-radius: var(--radius);
}

.custom-page-content a {
    color: var(--accent);
    text-decoration: underline;
}

/* === Footer Info === */
.site-footer {
    text-align: center;
    padding: 24px 16px 8px;
    color: var(--text-muted);
    font-size: 0.78em;
}

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

.footer-flag-bar {
    display: flex;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin: 12px auto;
    max-width: 120px;
}

.footer-flag-bar span:nth-child(1) { flex: 1; background: var(--royal-green); }
.footer-flag-bar span:nth-child(2) { flex: 1; background: #e0e0e0; }
.footer-flag-bar span:nth-child(3) { flex: 1; background: #1a1a1a; }

/* === Toast === */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--text-bright);
    border: 1px solid var(--border);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.88em;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    pointer-events: auto;
}

@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* === Responsive (Desktop) === */
@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .bottom-nav {
        display: none;
    }

    .app-main {
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: 2.4em;
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* Mobile admin */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(100%);
    }

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

    .admin-content {
        margin-right: 0;
        padding: 16px;
    }

    .data-table {
        font-size: 0.75em;
    }

    .data-table th, .data-table td {
        padding: 8px 10px;
    }
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-bright { color: var(--text-bright); }
.text-gold { color: var(--heading-color); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ========================================
   NEW COMPONENTS - Profile, Developers, Tool Footer, Settings
   ======================================== */

/* === Profile Avatar Image === */
.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--royal-green);
    box-shadow: 0 4px 12px rgba(0, 107, 63, 0.2);
}

/* === Profile Volunteer Badge === */
.profile-volunteer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 107, 63, 0.08), rgba(0, 107, 63, 0.15));
    color: var(--royal-green);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 12px;
    border: 1px solid rgba(0, 107, 63, 0.2);
}

/* === Profile Social Links === */
.profile-social-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}
.profile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}
.profile-social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 107, 63, 0.3);
}

/* === Freelance Badge === */
.profile-freelance-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 14px;
    border: 1px solid #a5d6a7;
}
.freelance-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #25D366;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    margin-right: 4px;
    transition: background 0.2s;
}
.freelance-contact-btn:hover {
    background: #1da851;
}

/* === Profile Support Section (Enhanced) === */
.profile-support-section {
    background: linear-gradient(135deg, #f8fdf9, #edf7f0);
    border: 1px solid rgba(0, 107, 63, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}
.support-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1em;
    font-weight: 700;
    color: var(--royal-green);
    margin-bottom: 8px;
}
.support-desc {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.support-methods {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.support-method-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.support-method-btn.paypal-btn {
    background: #0070ba;
    color: #fff;
}
.support-method-btn.paypal-btn:hover {
    background: #005ea6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
}
.support-method-btn.shamcash-btn {
    background: var(--royal-green);
    color: #fff;
}
.support-method-btn.shamcash-btn:hover {
    background: var(--royal-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 107, 63, 0.3);
}

/* === QR Modal === */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.qr-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.qr-modal-content h3 {
    font-size: 1.1em;
    color: var(--royal-green);
    margin-bottom: 8px;
}
.qr-modal-content p {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.qr-modal-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.qr-modal-close:hover {
    background: var(--bg-secondary);
}
.qr-dev-name {
    font-weight: 700;
    color: var(--royal-green);
    margin-top: 12px;
    font-size: 0.95em;
}

/* === Tool Footer Enhanced === */
.tool-footer-enhanced {
    background: linear-gradient(135deg, #f0f9f4, #e5f5ec) !important;
    border-top: 2px solid var(--royal-green) !important;
    padding: 10px 16px !important;
}
.tool-footer-dev-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}
.tool-footer-user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.tool-footer-user-name {
    font-size: 0.88em;
    font-weight: 700;
    color: var(--royal-green-dark);
}
.tool-footer-user-role {
    font-size: 0.7em;
    color: var(--text-muted);
}
.share-highlight-btn {
    color: var(--royal-green) !important;
}
.dev-profile-btn {
    background: var(--royal-green) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
}
.dev-profile-btn:hover {
    background: var(--royal-green-dark) !important;
}

/* === Developers List Page === */
.page-header-section {
    text-align: center;
    padding: 24px 16px 8px;
}
.page-main-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.3em;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 8px;
}
.page-subtitle {
    font-size: 0.9em;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}
.developers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
}
.developer-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}
.developer-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}
.developer-rank {
    font-size: 0.8em;
    font-weight: 800;
    color: var(--accent);
    background: var(--accent-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.developer-avatar-wrapper {
    flex-shrink: 0;
}
.developer-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-light);
}
.developer-avatar-letter {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: 700;
}
.developer-info {
    flex: 1;
    min-width: 0;
}
.developer-name {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.freelance-tag {
    font-size: 0.7em;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.developer-bio {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.developer-stats {
    display: flex;
    gap: 14px;
    margin-top: 6px;
}
.dev-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78em;
    color: var(--text-muted);
}
.developer-arrow {
    color: var(--text-muted);
    font-size: 1.4em;
    flex-shrink: 0;
}

/* === Settings Page Enhanced === */
.settings-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-light);
}
.avatar-upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
}
.avatar-preview-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}
.avatar-preview-letter {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    flex-shrink: 0;
}
.avatar-upload-info {
    flex: 1;
}
.avatar-upload-info .form-control {
    margin-bottom: 4px;
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.toggle-label input[type="checkbox"] {
    display: none;
}
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    transition: background 0.3s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    right: 2px;
    transition: transform 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-label input:checked + .toggle-switch {
    background: var(--royal-green);
}
.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(-20px);
}
.toggle-text {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-primary);
}

/* === About Page Support Methods === */
.about-support-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.about-support-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
}
.about-support-icon {
    font-size: 2em;
    margin-bottom: 8px;
}
.about-support-card h4 {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 6px;
}
.about-support-card p {
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.5;
}
@media (max-width: 480px) {
    .about-support-methods {
        grid-template-columns: 1fr;
    }
}

/* === Hero Actions === */
.hero-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}
.hero-dev-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: rgba(255,255,255,0.4) !important;
    color: rgba(255,255,255,0.9) !important;
}
.hero-dev-btn:hover {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.6) !important;
    color: #fff !important;
}

/* ===== Tabbed Profile Design ===== */
.pro-hero {
    background: linear-gradient(135deg, var(--royal-green) 0%, var(--royal-green-dark) 100%);
    border-radius: 16px;
    padding: 32px 20px 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 0;
    position: relative;
}
.pro-hero-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}
.pro-hero-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.5);
}
.pro-hero-letter {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 2.2em;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.5);
}
.pro-verified {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 18px;
    line-height: 1;
}
.pro-hero-name {
    font-size: 1.4em;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
}
.pro-hero-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.82em;
    opacity: 0.9;
    flex-wrap: wrap;
}
.pro-hero-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pro-hero-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.pro-hero-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
}
.pro-hero-social a:hover {
    background: rgba(255,255,255,0.3);
}
.pro-freelance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 0.82em;
    color: #fff;
}
.pro-freelance a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    text-decoration: none;
    transition: background 0.2s;
}
.pro-freelance a:hover {
    background: rgba(255,255,255,0.35);
}

/* Tabs Navigation */
.pro-tabs {
    display: flex;
    background: var(--bg-card);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    border-top: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
.pro-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.pro-tab:hover {
    color: var(--royal-green);
    background: rgba(0,107,63,0.04);
}
.pro-tab.active {
    color: var(--royal-green);
    border-bottom-color: var(--royal-green);
    background: rgba(0,107,63,0.06);
}
.pro-tab svg {
    flex-shrink: 0;
}

/* Tab Content */
.pro-tab-content {
    display: none;
}
.pro-tab-content.active {
    display: block;
}

/* Two-Column Layout */
.pro-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    direction: rtl;
}
@media (max-width: 768px) {
    .pro-layout {
        grid-template-columns: 1fr;
    }
}
.pro-main, .pro-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Profile Cards */
.pro-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.pro-card-title {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color, #eee);
}
.pro-bio-text {
    font-size: 0.88em;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* Skills Tags */
.pro-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pro-skill-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(0,107,63,0.08);
    color: var(--royal-green);
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 600;
    transition: background 0.2s;
}
.pro-skill-tag:hover {
    background: rgba(0,107,63,0.15);
}

/* Volunteer Message */
.pro-volunteer-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(0,107,63,0.06);
    border-radius: 10px;
    font-size: 0.82em;
    color: var(--royal-green);
    font-weight: 600;
    border: 1px dashed rgba(0,107,63,0.2);
}
.pro-volunteer-msg svg {
    flex-shrink: 0;
    color: #e74c3c;
}

/* Stats Rows */
.pro-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.85em;
}
.pro-stat-row:last-child {
    border-bottom: none;
}
.pro-stat-label {
    color: var(--text-secondary);
}
.pro-stat-value {
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pro-stars {
    display: inline-flex;
    gap: 1px;
}

/* Badges */
.pro-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pro-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(0,107,63,0.05);
    border-radius: 8px;
    font-size: 0.78em;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.2s;
}
.pro-badge:hover {
    background: rgba(0,107,63,0.1);
}
.pro-badge-icon {
    font-size: 1.2em;
}

/* Support Card in Sidebar */
.pro-support-card {
    border: 1px solid rgba(0,107,63,0.15);
    background: rgba(0,107,63,0.02);
}
.pro-support-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===== Paid Tool Access Gate ===== */
.paid-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,30,15,0.85);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.paid-gate-modal {
    background: #fff;
    border-radius: 18px;
    padding: 36px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    animation: paidGateIn 0.4s ease;
}
@keyframes paidGateIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.paid-gate-icon {
    font-size: 3em;
    margin-bottom: 12px;
}
.paid-gate-title {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.paid-gate-desc {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}
.paid-gate-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82em;
    margin-bottom: 14px;
    text-align: right;
}
.paid-gate-field {
    text-align: right;
    margin-bottom: 12px;
}
.paid-gate-field label {
    display: block;
    font-size: 0.82em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.paid-gate-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.92em;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}
.paid-gate-field input:focus {
    border-color: var(--royal-green);
    outline: none;
}
.paid-gate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--royal-green), var(--royal-green-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
    font-family: inherit;
    margin-top: 6px;
}
.paid-gate-btn:hover {
    opacity: 0.9;
}
.paid-gate-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}
.paid-gate-divider {
    position: relative;
    text-align: center;
    margin: 22px 0 16px;
    border-top: 1px solid #e5e7eb;
}
.paid-gate-divider span {
    background: #fff;
    padding: 0 14px;
    position: relative;
    top: -10px;
    font-size: 0.78em;
    color: var(--text-secondary);
}
.paid-gate-contact p {
    font-size: 0.82em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.paid-gate-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #25D366;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    text-decoration: none;
    transition: opacity 0.2s;
}
.paid-gate-whatsapp:hover {
    opacity: 0.85;
}
.paid-gate-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--royal-green);
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
}

/* Paid Badge on Tool Items */
.paid-tool-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 10px;
    font-size: 0.65em;
    font-weight: 700;
    margin-right: 6px;
    vertical-align: middle;
}

/* ===== Tool Access Management Page ===== */
.paid-access-form {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,107,63,0.12);
}
.access-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.access-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-right: 4px solid var(--royal-green);
}
.access-item.access-expired {
    border-right-color: #ef4444;
    opacity: 0.65;
}
.access-item.access-revoked {
    border-right-color: #9ca3af;
    opacity: 0.5;
}
.access-info {
    flex: 1;
}
.access-email {
    font-weight: 700;
    font-size: 0.9em;
    color: var(--text-primary);
    direction: ltr;
    text-align: right;
}
.access-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.78em;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.access-status-badge {
    padding: 1px 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
}
.access-status-active {
    background: #dcfce7;
    color: #166534;
}
.access-status-expired {
    background: #fef2f2;
    color: #dc2626;
}
.access-status-revoked {
    background: #f3f4f6;
    color: #6b7280;
}
.btn-xs {
    padding: 4px 10px !important;
    font-size: 0.78em !important;
    min-width: auto !important;
}
.btn-danger {
    background: #ef4444 !important;
    color: #fff !important;
    border: none !important;
}
@media (max-width: 600px) {
    .paid-access-form form > div {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Paid Tool Ribbon ===== */
.tool-item {
    position: relative;
    overflow: hidden;
}
.tool-item-paid {
    border: 2px solid #f59e0b !important;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 30%) !important;
}
.tool-paid-ribbon {
    position: absolute;
    top: 12px;
    left: -32px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 36px;
    transform: rotate(45deg);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ===== Disabled Cards (Empty Faculties/Specs) ===== */
.card-disabled {
    opacity: 0.45;
    filter: grayscale(0.8);
}
.card-disabled .card-count {
    color: var(--text-muted);
    font-style: italic;
}
.card-disabled:hover {
    opacity: 0.7;
    filter: grayscale(0.3);
}

/* ===== PWA Install Banner ===== */
.pwa-banner {
    position: fixed;
    bottom: 70px;
    left: 16px;
    right: 16px;
    background: linear-gradient(135deg, #006B3F, #004d2c);
    color: #fff;
    padding: 16px 20px;
    border-radius: 16px;
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    animation: slideUp 0.3s ease;
}
.pwa-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pwa-banner-text strong {
    font-size: 0.95em;
}
.pwa-banner-text span {
    font-size: 0.8em;
    opacity: 0.9;
}
.pwa-banner-actions {
    display: flex;
    gap: 8px;
}
.pwa-btn-install {
    background: #fff;
    color: #006B3F;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: transform 0.2s;
}
.pwa-btn-install:hover {
    transform: scale(1.05);
}
.pwa-btn-later {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85em;
    cursor: pointer;
}
@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== Apply Form ===== */
.form-modern .form-group {
    margin-bottom: 16px;
}
.form-modern label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text);
}
.form-modern .form-control {
    width: 100%;
}
.form-modern textarea.form-control {
    resize: vertical;
    min-height: 80px;
}
