:root {
    --primary-color: #003366;
    /* Navy Blue TJMG */
    --secondary-color: #D4AF37;
    /* Gold */
    --accent-color: #0056b3;
    --text-color: #333;
    --bg-color: #f4f7fa;
    --white: #ffffff;
    --gray-light: #e0e0e0;
    --success: #28a745;
    --warning: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Portal Decision Card (Moved to top for priority) */
.portal-card {
    background: white !important;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s;
    display: block;
}

.portal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Portal Styles (Moved to top for priority) */
.magistrate-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.mini-avatar {
    width: 30px;
    height: 30px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #555;
    overflow: hidden;
    /* Ensure radius applies */
}

.magistrate-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.magistrate-name a {
    color: inherit;
    text-decoration: none;
}

.magistrate-name a:hover {
    text-decoration: underline;
}

/* Login Page Styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #001f3f 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.logo-placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    border: 2px solid var(--primary-color);
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.btn-govbr {
    width: 100%;
    padding: 12px;
    background-color: #1351B4;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-govbr:hover {
    background-color: #0c3d8e;
}

.divider {
    margin: 15px 0;
    color: #999;
    font-size: 0.8rem;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #eee;
}

.divider::before {
    left: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Ensure it's on top */
}

.divider::after {
    right: 0;
}

.btn-sso {
    width: 100%;
    padding: 12px;
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

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

.login-footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #888;
}

.login-footer .small {
    font-size: 0.7rem;
    margin-top: 5px;
}

/* Dashboard Styles */
/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.sidebar {
    width: 250px;
    background: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
    /* Prevent shrinking */
    transition: width 0.3s ease;
}

.sidebar-head.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.publish-group {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #eee;
}

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

.btn-primary.outline:hover {
    background: var(--bg-light);
}

/* Sidebar Inner Styles */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-small {
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.avatar {
    width: 35px;
    height: 35px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
}

.user-info .name {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-info .role {
    font-size: 0.75rem;
    opacity: 0.7;
}

.btn-logout {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Decision List Styles */
.content-area {
    margin-top: 30px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
    padding-left: 10px;
}

.decision-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.decision-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s;
}

.decision-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.decision-info {
    flex: 1;
}

.decision-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.decision-card h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
}

.decision-preview {
    font-size: 0.9rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-review {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 20px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-review:hover {
    background: var(--accent-color);
}

/* Responsive Sidebar */
@media (max-width: 900px) {
    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }

    .sidebar-header span,
    .nav-item span,
    .user-info .name,
    .user-info .role,
    .sidebar-footer .btn-logout {
        display: none;
    }

    .sidebar-header {
        justify-content: center;
        margin-bottom: 20px;
    }

    .nav-item {
        justify-content: center;
        padding: 15px 0;
    }

    .user-info {
        justify-content: center;
    }

    .avatar {
        margin: 0;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
    overflow-y: auto;
    min-width: 0;
    /* Allow flex item to shrink below content size if needed */
}

/* ... (rest of styles) ... */

/* Admin Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        flex-direction: column;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.dash-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dash-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Modal Styles - Redesigned */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #f4f7fa;
    margin: 2% auto;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Modal Header */
.modal-header {
    background: white;
    padding: 15px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.close {
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close:hover {
    color: #333;
}

/* Relevance Badge */
.badge-relevance {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-high {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.badge-medium {
    background: #e1f5fe;
    color: #0277bd;
    border: 1px solid #b3e5fc;
}

.badge-low {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

/* Modal Body - Grid Layout */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.modal-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards */
.editor-card,
.visual-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.card-header {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    font-size: 0.8rem;
    color: #999;
    cursor: help;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon {
    font-size: 0.8rem;
    color: #999;
    transition: transform 0.3s;
}

.card-body {
    padding: 20px;
}

/* Inputs */
.input-editable {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.input-editable:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Original Text Box */
.original-text-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
}

/* AI Image Card */
.image-wrapper {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

#ai-generated-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.image-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    flex: 1;
    padding: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #f5f5f5;
}

/* General Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #002244;
    /* Darker shade */
}

.btn-secondary {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e2e6ea;
}

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

.btn-primary.outline:hover {
    background: rgba(0, 51, 102, 0.05);
}

/* Preview Mockup */
.preview-mockup {
    background: #f0f2f5;
    padding: 15px;
    border-radius: 6px;
    opacity: 0.7;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mockup-avatar {
    width: 30px;
    height: 30px;
    background: #ddd;
    border-radius: 50%;
}

.mockup-name {
    width: 80px;
    height: 10px;
    background: #ddd;
    border-radius: 4px;
}

.mockup-content-lines .line {
    height: 8px;
    background: #ddd;
    margin-bottom: 6px;
    border-radius: 4px;
}

.line.short {
    width: 60%;
}

.mockup-image-placeholder {
    height: 100px;
    background: #e1e4e8;
    border-radius: 4px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}

/* Preview Tabs */
.preview-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Social Mockups */
.preview-mockup {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mockup-avatar {
    width: 32px;
    height: 32px;
    background: #ddd;
    border-radius: 50%;
}

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

.mockup-meta .name {
    font-weight: 700;
    color: #000;
}

.mockup-meta .handle,
.mockup-meta .time {
    color: #666;
    font-size: 0.75rem;
}

.mockup-text {
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
}

/* Specific Platform Styles */
.x-mockup {
    border-color: #cfd9de;
}

.insta-mockup .mockup-image-placeholder.square {
    height: 200px;
    /* Square-ish */
    margin-bottom: 10px;
}

.mockup-actions {
    font-size: 1.2rem;
    margin-bottom: 8px;
    letter-spacing: 5px;
}

.fb-mockup .mockup-actions-fb {
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 5px;
    color: #666;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-around;
}

/* Modal Footer */
.modal-footer {
    background: white;
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

.btn-primary-large {
    background: #28a745;
    /* Vibrant Green */
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary-large:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-text {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-weight: 500;
}

.btn-text:hover {
    color: #333;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-content {
        height: 100%;
        margin: 0;
        width: 100%;
        border-radius: 0;
    }
}

.trend.up {
    color: var(--success);
    font-size: 0.85rem;
}

.desc {
    font-size: 0.85rem;
    color: #888;
}

/* Profile Page Styles */
.profile-body {
    background: #fff;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 0;
    border-bottom: 4px solid var(--secondary-color);
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-box {
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 4px;
}

.header-text h1 {
    font-size: 1.1rem;
    margin: 0;
}

.header-text p {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

.btn-search {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Hero Section */
.profile-hero {
    background: #f8f9fa;
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    color: white;
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.verified-badge {
    display: inline-block;
    background: #1da1f2;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.profile-info h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.bio {
    color: #555;
    max-width: 600px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.tour-highlight.pulse {
    animation: tourPulse 2s infinite;
}

.btn-text-white {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 15px;
    transition: all 0.3s;
}

.btn-text-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.twitter {
    background: #000;
    color: white;
}

.linkedin {
    background: #0077b5;
    color: white;
}

.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

/* Feed */
.profile-feed {
    padding: 50px 20px;
}

.profile-feed h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 30px;
    color: #333;
}

.feed-card {
    margin-bottom: 40px;
}

.feed-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.tag {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    color: #555;
}

.feed-card h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.feed-card h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.feed-card h4 a:hover {
    text-decoration: underline;
}

.feed-card p {
    color: #444;
    line-height: 1.7;
    margin-bottom: 15px;
}

.feed-actions {
    display: flex;
    gap: 20px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-share {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0;
}

.profile-footer {
    background: #333;
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
}

.profile-footer .small {
    color: #888;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box input {
    padding: 8px 12px;
    border-radius: 20px;
    border: none;
    font-size: 0.9rem;
    width: 250px;
}

.btn-restricted {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-restricted:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Portal Styles */
.portal-body {
    background: #f4f7fa;
}

.portal-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 0;
    position: relative;
    z-index: 1000;
}

.portal-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #001f3f 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-center {
    max-width: 800px;
    margin: 0 auto;
}

.portal-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.portal-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    background: white;
    padding: 5px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-wrapper input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    border-radius: 25px;
    outline: none;
}

.btn-search-hero {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-search-hero:hover {
    transform: scale(1.05);
}

.quick-tags {
    margin-top: 20px;
    font-size: 0.9rem;
}

.quick-tags span {
    opacity: 0.7;
    margin-right: 10px;
}

.quick-tags a {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 15px;
    margin: 0 5px;
    transition: background 0.2s;
}

.quick-tags a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.portal-feed {
    padding: 50px 20px;
}

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

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Portal Decision Card moved to top */

/* Portal Styles moved to top */


/* Back Button */
.btn-back {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-right: 15px;
}

.btn-back:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb-area {
    padding: 20px 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-area a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-area a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 10px;
    color: #ccc;
}

.current {
    color: #333;
    font-weight: 600;
}

/* Decision Detail */
.decision-detail {
    padding-bottom: 50px;
}

.detail-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.detail-header {
    margin-bottom: 30px;
}

.tag-large {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 15px;
}

.detail-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.meta-row {
    display: flex;
    gap: 30px;
    color: #666;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.meta-row a {
    color: var(--primary-color);
    text-decoration: none;
}

.meta-row a:hover {
    text-decoration: underline;
}

.detail-body {
    line-height: 1.8;
    color: #444;
}

.detail-body h3 {
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.detail-body .lead {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.detail-body hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.detail-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}

.btn-download {
    background: #333;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-share-large {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Dashboard Layout Adjustments */
.dashboard-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.dashboard-container {
    flex: 1;
    height: auto;
    /* Allow it to take remaining height */
    margin-top: 0;
    /* Reset margin since it's now below header */
}

/* Ensure sidebar and content take full remaining height */
.dashboard-container {
    display: flex;
    overflow: hidden;
    /* Prevent double scrollbars */
}

.sidebar {
    height: 100%;
}

.main-content {
    height: 100%;
    overflow-y: auto;
}

/* Hamburger Menu */
.btn-hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 20px;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.2s;
}

.btn-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Collapsible Sidebar */
.sidebar {
    transition: width 0.3s ease, padding 0.3s ease;
    width: 280px;
    /* Default width */
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-collapsed .sidebar {
    width: 0;
    padding: 0;
    border: none;
}

.sidebar-collapsed .main-content {
    margin-left: 0;
}

/* Login Back Link */
.login-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.login-back-link:hover {
    color: var(--primary-color);
}

/* Institutional Social Links (Decision Page) */
.institutional-social {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.institutional-social h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.institutional-social .social-links {
    justify-content: flex-start;
    /* Ensure they align left */
}

/* Editorial Funnel Styles */
.badge-impact-high {
    background: #ffebee;
    color: #c62828;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 10px;
    border: 1px solid #ffcdd2;
}

.badge-impact-medium {
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 10px;
    border: 1px solid #bbdefb;
}

.badge-impact-low {
    background: #f5f5f5;
    color: #616161;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 10px;
    border: 1px solid #e0e0e0;
}

.ai-recommendation-box {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.rec-high {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
}

.rec-medium {
    background: #e1f5fe;
    border: 1px solid #b3e5fc;
    color: #0277bd;
}

.rec-low {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #757575;
}

/* AI Image Container */
.ai-image-container {
    margin-top: 1.5rem;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ai-image-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ai-generated-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #ddd;
    display: block;
    transition: transform 0.3s;
}

#ai-generated-image:hover {
    transform: scale(1.02);
}

/* Guided Tour Styles */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tour-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px var(--secondary-color), 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tour-tooltip {
    position: absolute;
    background: white;
    width: 320px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tour-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.tour-tooltip h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-tooltip p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-steps {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
}

.tour-controls {
    display: flex;
    gap: 10px;
}

.btn-tour {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-tour-skip {
    background: transparent;
    color: #777;
}

.btn-tour-skip:hover {
    color: #333;
}

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

.btn-tour-next:hover {
    background: #002244;
}

@keyframes tourPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.tour-highlight.pulse {
    animation: tourPulse 2s infinite;
}

.btn-text-white {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 15px;
    transition: all 0.3s;
}

.btn-text-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}