/* Twemoji Country Flags — only loads for flag emoji codepoints (Windows fix) */
@font-face {
    font-family: "Twemoji Country Flags";
    unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
        U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
    src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
    font-display: swap;
}

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #f97316;
    --dark: #0f172a;
    --dark-lighter: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;

    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Twemoji Country Flags", 'Poppins', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--gray-800);
    overflow-x: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.005em;
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-logo-img {
    height: 38px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.sidebar-logo-icon {
    font-size: 1.4rem;
    color: var(--primary-light);
    display: none;
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar.collapsed .sidebar-logo-img {
    display: none;
}

.sidebar.collapsed .sidebar-logo-icon {
    display: block;
}

/* Top-nav right cluster (EU logo + profile) */
.top-nav-right {
    display: flex;
    align-items: center;
}

/* Top-nav EU co-funded logo */
.eu-logo-admin {
    display: flex;
    align-items: center;
    margin-right: 25px;
    padding-right: 25px;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.eu-logo-admin:hover {
    opacity: 0.85;
}

.eu-logo-admin img {
    height: 36px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .eu-logo-admin {
        margin-right: 12px;
        padding-right: 12px;
    }
    .eu-logo-admin img {
        height: 28px;
    }
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    color: var(--primary-light);
}

.nav-links {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.nav-links li {
    padding: 5px 15px;
    margin-bottom: 5px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray-300);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover, .nav-links li.active a {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.nav-links li.active a {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.nav-links a i {
    font-size: 1.2rem;
    min-width: 25px;
    text-align: center;
}

.sidebar.collapsed .link-text {
    display: none;
}

.sidebar-footer {
    padding: 20px 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray-300);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    margin-bottom: 5px;
}

.sidebar-footer a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.sidebar-footer .logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Navbar */
.top-nav {
    height: var(--header-height);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    padding: 10px 15px;
    border-radius: 20px;
    width: 300px;
    gap: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--gray-800);
    font-family: "Twemoji Country Flags", 'Poppins', sans-serif;
}

.search-bar i {
    color: var(--gray-600);
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 25px;
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-600);
}

.notifications .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: bold;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Page Container */
.page-container {
    padding: 30px;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

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

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

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 25px;
}

.page-header .page-title {
    margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

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

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

.stat-details h3 {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-details h2 {
    font-size: 1.6rem;
    color: var(--dark);
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Widgets & Tables */
.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 10px;
}

.activity-list {
    list-style: none;
}

.activity-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray-800);
}

.activity-list li:last-child {
    border-bottom: none;
}

.text-blue { color: var(--primary); }
.text-green { color: var(--success); }
.text-orange { color: var(--warning); }

.table-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    overflow-x: auto;
}

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

.admin-table th, .admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table th {
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
    background: var(--gray-100);
}

.admin-table td {
    color: var(--gray-800);
    font-size: 0.95rem;
}

/* Badges & Buttons */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-info { background: rgba(14, 165, 233, 0.1); color: var(--info); }

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: "Twemoji Country Flags", 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-600);
}

.btn-outline:hover {
    background: var(--gray-100);
    color: var(--dark);
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    margin-right: 10px;
    transition: var(--transition);
}

.action-btn.edit { color: var(--primary); }
.action-btn.delete { color: var(--danger); }

.action-btn:hover {
    transform: scale(1.1);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    position: relative;
    animation: slideUpModal 0.4s ease;
}

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

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

.modal-header h2 {
    color: var(--dark);
    font-size: 1.5rem;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--gray-600);
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: "Twemoji Country Flags", 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ─── Activities & Budget Page ─── */

.partner-involvement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.partner-card-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.2s ease;
}
.partner-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.partner-flag-big { font-size: 36px; line-height: 1; }
.partner-info { flex: 1; }
.partner-info h4 { margin: 0; font-size: 15px; color: #1e293b; font-weight: 600; }
.partner-info p { margin: 2px 0 0; font-size: 12px; color: #94a3b8; }
.partner-stat { text-align: right; }
.partner-stat-num { font-size: 28px; font-weight: 800; line-height: 1; }
.partner-stat-label { font-size: 11px; color: #94a3b8; margin-top: 4px; }

/* Filter buttons */
.filter-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.filter-btn:hover { background: #e2e8f0; }
.filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Activity card */
.activity-card-admin {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.2s;
}
.activity-card-admin:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.activity-card-admin[data-status="completed"] { border-left: 4px solid #10b981; }
.activity-card-admin[data-status="in-progress"] { border-left: 4px solid #f59e0b; }
.activity-card-admin[data-status="upcoming"] { border-left: 4px solid #3b82f6; }
.activity-card-admin[data-status="planned"] { border-left: 4px solid #cbd5e1; }

.activity-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
}
.activity-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}
.activity-title-block { flex: 1; min-width: 0; }
.activity-title-block h3 { margin: 0; font-size: 18px; color: #1e293b; font-weight: 700; line-height: 1.3; }
.activity-meta-row { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.type-badge {
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.activity-type-text { color: #64748b; font-size: 13px; font-weight: 500; }
.status-badge {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.activity-card-body { padding: 18px 22px 22px; }

.activity-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
}
.info-row { font-size: 14px; color: #475569; }
.info-row i { color: #3b82f6; margin-right: 8px; width: 16px; }
.info-row strong { color: #1e293b; }

.participants-section { margin-bottom: 18px; }
.participants-section h4 { margin: 0 0 10px; font-size: 14px; color: #1e293b; font-weight: 600; }
.participants-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.part-cell {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    transition: transform 0.15s;
}
.part-cell:hover { transform: scale(1.03); }
.part-flag { font-size: 22px; line-height: 1; }
.part-num { font-size: 24px; font-weight: 800; color: #1e293b; margin-top: 4px; line-height: 1; }
.part-label { font-size: 11px; color: #64748b; margin-top: 4px; font-weight: 600; letter-spacing: 0.5px; }
.part-cell.part-total {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-color: #1e293b;
}
.part-cell.part-total .part-num,
.part-cell.part-total .part-label { color: white; }

.budget-section { margin-bottom: 16px; }
.budget-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #475569;
}
.budget-value { font-size: 18px; font-weight: 800; color: #1e293b; }
.budget-pct { color: #94a3b8; font-size: 12px; margin-left: auto; }
.budget-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.budget-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.activity-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px;
}

.activity-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.activity-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* ─── Partners Admin Editor ─── */
.partner-editor {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}
.partner-editor:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.partner-editor-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.partner-flag-input {
    width: 56px; height: 56px;
    font-size: 32px;
    text-align: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.partner-editor-head .name-block { flex: 1; }
.partner-editor-head h3 { margin: 0; font-size: 18px; color: #1e293b; font-weight: 700; }
.partner-editor-head small { color: #94a3b8; font-size: 12px; }

.partner-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 18px;
}
.partner-form-grid .full { grid-column: 1 / -1; }
.partner-form-grid label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.partner-form-grid input,
.partner-form-grid textarea,
.partner-form-grid select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.15s;
}
.partner-form-grid input:focus,
.partner-form-grid textarea:focus,
.partner-form-grid select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.partner-form-grid textarea { resize: vertical; min-height: 70px; }

.partner-section-divider {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.highlight-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px;
    margin-bottom: 6px;
}

.logo-uploader {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
}
.logo-preview {
    width: 100%;
    min-height: 120px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}
.logo-preview img {
    max-width: 220px;
    max-height: 110px;
    object-fit: contain;
}
.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 12px;
}
.logo-placeholder i { font-size: 28px; }
.logo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-btn {
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s;
}
.logo-btn.primary { background: #3b82f6; color: white; }
.logo-btn.primary:hover { background: #2563eb; }
.logo-btn.danger { background: #fee2e2; color: #b91c1c; }
.logo-btn.danger:hover { background: #fecaca; }
.logo-url-input { font-size: 12px !important; }

.partner-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.partner-save-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}
.partner-save-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.partner-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.partner-save-msg {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: none;
}
.partner-save-msg.success { display: inline-block; background: #d1fae5; color: #065f46; }
.partner-save-msg.error   { display: inline-block; background: #fee2e2; color: #991b1b; }
.partner-save-msg.loading { display: inline-block; background: #dbeafe; color: #1e40af; }

/* ─── Activities Admin Editor ─── */
.activity-editor {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}
.activity-editor:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }

.activity-editor[data-color="blue"]   { border-left-color: #7c3aed; }
.activity-editor[data-color="green"]  { border-left-color: #9333ea; }
.activity-editor[data-color="orange"] { border-left-color: #c026d3; }
.activity-editor[data-color="teal"]   { border-left-color: #4f46e5; }
.activity-editor[data-color="red"]    { border-left-color: #a21caf; }
.activity-editor[data-color="purple"] { border-left-color: #a855f7; }
.activity-editor[data-color="indigo"] { border-left-color: #6366f1; }
.activity-editor[data-color="navy"]   { border-left-color: #312e81; }

.activity-editor-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    user-select: none;
    transition: background 0.15s;
}
.activity-editor-head:hover { background: #f1f5f9; }

.activity-editor-num {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}
.activity-editor-info { flex: 1; min-width: 0; }
.activity-editor-info h3 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.3;
}
.activity-editor-info small { color: #94a3b8; font-size: 12px; }

.activity-editor-toggle {
    width: 30px;
    text-align: center;
    color: #64748b;
    font-size: 16px;
    transition: transform 0.2s;
}
.activity-editor.collapsed .activity-editor-toggle { transform: rotate(-90deg); }
.activity-editor.collapsed .activity-editor-body { display: none; }

.activity-editor-body { padding: 20px 24px 24px; border-top: 1px solid #f1f5f9; }

.act-section-title {
    margin: 22px 0 12px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.act-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.act-section-title i { color: #3b82f6; }

.act-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}
.act-form-grid .full { grid-column: 1 / -1; }
.act-form-grid label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.act-form-grid label small { color: #94a3b8; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.act-form-grid input,
.act-form-grid textarea,
.act-form-grid select {
    width: 100%;
    padding: 8px 11px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    transition: all 0.15s;
}
.act-form-grid input:focus,
.act-form-grid textarea:focus,
.act-form-grid select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.act-form-grid textarea { resize: vertical; min-height: 60px; font-family: inherit; }
.act-form-grid textarea.long { min-height: 120px; }

.partner-role-block {
    grid-column: 1 / -1;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 60px 1fr 2fr;
    gap: 10px;
    align-items: end;
    margin-bottom: 8px;
}

/* Photos uploader */
.photos-uploader { margin-top: 4px; }
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-height: 80px;
}
.photos-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.photos-empty i { font-size: 22px; opacity: 0.5; }

.activity-photo-thumb {
    aspect-ratio: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #cbd5e1;
}
.activity-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.25s;
    display: block;
}
.activity-photo-thumb:hover img { transform: scale(1.05); }
.photo-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.92);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.activity-photo-thumb:hover .photo-delete-btn { opacity: 1; }
.photo-delete-btn:hover { background: #b91c1c; transform: scale(1.1); }

.photos-upload-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.photos-hint { font-size: 12px; color: #94a3b8; }

.photos-status { margin-top: 8px; font-size: 13px; }
.photos-status .photos-status { display: inline-block; padding: 6px 12px; border-radius: 6px; }
.photos-status.loading,
.photos-status > .loading { background: #dbeafe; color: #1e40af; padding: 6px 12px; border-radius: 6px; display: inline-block; font-weight: 500; }
.photos-status.success,
.photos-status > .success { background: #d1fae5; color: #065f46; padding: 6px 12px; border-radius: 6px; display: inline-block; font-weight: 600; }
.photos-status.error,
.photos-status > .error   { background: #fee2e2; color: #991b1b; padding: 6px 12px; border-radius: 6px; display: inline-block; font-weight: 600; }

.activity-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.act-save-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s;
}
.act-save-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.act-msg {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: none;
}
.act-msg.success { display: inline-block; background: #d1fae5; color: #065f46; }
.act-msg.error   { display: inline-block; background: #fee2e2; color: #991b1b; }
.act-msg.loading { display: inline-block; background: #dbeafe; color: #1e40af; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    .sidebar .link-text, .sidebar .logo span {
        display: none;
    }
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    .search-bar {
        display: none;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .participants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .activity-card-header { flex-direction: column; }
    .status-badge { margin-left: 0; }
    .partner-form-grid { grid-template-columns: 1fr; }
    .highlight-row { grid-template-columns: 1fr; }
    .act-form-grid { grid-template-columns: 1fr; }
    .partner-role-block { grid-template-columns: 1fr; }
}

/* Inquiry filter count badge */
.filter-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    background: rgba(255,255,255,0.25);
    color: inherit;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.filter-btn:not(.active) .filter-count {
    background: #e2e8f0;
    color: #475569;
}
tr.inquiry-handled {
    background: #f8fafc;
    color: #94a3b8;
}
tr.inquiry-handled strong { color: #64748b; font-weight: 500; }

/* ─── Form Audience (assignment) panel ─── */
.audience-panel { margin: 0 0 22px; }
.audience-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}
.audience-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.audience-summary {
    margin-left: 8px;
    color: #475569;
    font-weight: 600;
    background: #eff6ff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
}
.audience-toggle { padding: 7px 14px; font-size: 13px; }
.audience-body { margin-top: 16px; border-top: 1px solid #f1f5f9; padding-top: 16px; }
.audience-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}
.audience-radio input { width: auto; margin: 0; }
.audience-selected-area { margin: 10px 0 4px; }
.audience-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.audience-search { flex: 1; min-width: 200px; }
.audience-link {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 6px;
}
.audience-link:hover { text-decoration: underline; }
.audience-count { color: #94a3b8; font-size: 12px; }
.audience-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
}
.audience-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.audience-item:hover { background: #f8fafc; }
.audience-item input { width: auto; margin: 0; flex-shrink: 0; }
.audience-item-name { font-weight: 600; color: #1e293b; }
.audience-item-email { color: #94a3b8; font-size: 12px; margin-left: auto; }
.audience-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.audience-msg { font-size: 13px; font-weight: 600; }

/* ─── Per-session assignment (inside Feedback session rows) ─── */
.session-aud-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.session-aud-summary {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.session-aud-toggle {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.session-aud-toggle:hover { background: #e2e8f0; }
.session-aud-body { margin-top: 12px; }
.session-aud-selected { margin-top: 8px; }
.session-aud-list { max-height: 220px; }

/* Country filter chips inside the assignment list */
.audience-country-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.audience-country-chip:hover { background: #f1f5f9; }
.audience-country-chip.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}
.audience-country-chip .cc-n {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 2px;
}

/* ─── Feedback form cards (accordion) ─── */
.btn-sm { padding: 7px 13px; font-size: 13px; }
.form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.form-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    flex-wrap: wrap;
}
.form-card-head:hover { background: #f8fafc; }
.form-card-title { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.form-card-title strong { font-size: 15px; color: #1e293b; }
.form-card-sub { font-size: 12.5px; color: #94a3b8; margin-top: 2px; }
.form-card-chevron { color: #94a3b8; transition: transform 0.18s ease; }
.form-card-chevron.open { transform: rotate(90deg); }
.form-card-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-card-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.form-card-progress { font-size: 13px; font-weight: 700; color: #334155; }
.form-card-bar {
    width: 90px;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.form-card-bar > div { height: 100%; background: #10b981; border-radius: 999px; }
.form-card-body {
    padding: 4px 18px 20px;
    border-top: 1px solid #f1f5f9;
}
.form-card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.form-card-h4 {
    margin: 20px 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}
.pending-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pending-chip {
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12.5px;
    font-weight: 600;
}

/* ─── Google-Forms-style question builder ─── */
.gf-builder { max-width: 760px; margin: 0 auto; }
.gf-block-label {
    margin: 26px 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #64748b;
    display: flex; align-items: center; gap: 8px;
}
.gf-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #8b5cf6;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.gf-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gf-tag {
    background: #ede9fe; color: #6d28d9;
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px;
    padding: 4px 9px; border-radius: 6px; flex-shrink: 0;
}
.gf-section-title {
    flex: 1;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    padding: 6px 2px;
    font-family: inherit;
}
.gf-section-title:focus { outline: none; border-bottom-color: #8b5cf6; }
.gf-statements { display: flex; flex-direction: column; gap: 10px; }

.gf-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 14px 14px 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gf-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.gf-card:focus-within { border-left-color: #8b5cf6; box-shadow: 0 2px 12px rgba(139,92,246,0.12); }
.gf-card-main { flex: 1; min-width: 0; }
.gf-stmt-text, .gf-open-text {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid #e2e8f0;
    background: transparent;
    font-size: 15px;
    color: #1e293b;
    padding: 6px 2px;
    font-family: inherit;
}
.gf-stmt-text:focus, .gf-open-text:focus { outline: none; border-bottom-color: #8b5cf6; }
.gf-scale {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px; flex-wrap: wrap;
}
.gf-scale-end { font-size: 11.5px; color: #94a3b8; }
.gf-scale-pill {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid #cbd5e1; border-radius: 50%;
    font-size: 12px; font-weight: 600; color: #94a3b8;
}
.gf-open-preview {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 13px;
    border-bottom: 1px dotted #cbd5e1;
    display: inline-flex; align-items: center; gap: 7px;
    padding-bottom: 4px;
}
.gf-tools { display: flex; gap: 2px; flex-shrink: 0; }
.gf-tool {
    width: 30px; height: 30px;
    border: none; background: transparent;
    color: #94a3b8; cursor: pointer; border-radius: 7px;
    font-size: 13px;
}
.gf-tool:hover { background: #f1f5f9; color: #475569; }
.gf-tool-del:hover { background: #fee2e2; color: #dc2626; }

.gf-add-inline {
    margin-top: 12px;
    background: transparent; border: none;
    color: #8b5cf6; font-weight: 600; font-size: 13.5px;
    cursor: pointer; padding: 6px 4px;
    display: inline-flex; align-items: center; gap: 7px;
}
.gf-add-inline:hover { text-decoration: underline; }
.gf-add-btn {
    width: 100%;
    background: #fff;
    border: 1.5px dashed #cbd5e1;
    color: #6d28d9;
    font-weight: 600; font-size: 14px;
    padding: 13px; border-radius: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    transition: all 0.15s ease;
}
.gf-add-btn:hover { border-color: #8b5cf6; background: #faf5ff; }
