/* 
   Sharik Saaz Custom Premium Design System
   Primary Color: #0D2C58 (Deep Navy Blue)
   Secondary Color: #ff9606 (Vibrant Orange)
*/

@font-face {
    font-family: 'PeydaFaNum';
    src: url('../fonts/PeydaWebFaNum-Regular.woff2') format('woff2'),
         url('../fonts/PeydaWebFaNum-Regular.woff') format('woff'),
         url('../fonts/PeydaFaNum-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PeydaFaNum';
    src: url('../fonts/PeydaWebFaNum-Bold.woff2') format('woff2'),
         url('../fonts/PeydaWebFaNum-Bold.woff') format('woff'),
         url('../fonts/PeydaFaNum-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/IRANSansXFaNum-Regular.woff2') format('woff2'),
         url('../fonts/IRANSansXFaNum-Regular.woff') format('woff'),
         url('../fonts/IRANSansXFaNum-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSansXFaNum';
    src: url('../fonts/IRANSansXFaNum-Bold.woff2') format('woff2'),
         url('../fonts/IRANSansXFaNum-Bold.woff') format('woff'),
         url('../fonts/IRANSansXFaNum-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary: #0D2C58;
    --primary-light: #164079;
    --primary-rgb: 13, 44, 88;
    --secondary: #ff9606;
    --secondary-rgb: 255, 150, 6;
    --secondary-hover: #e58700;
    --dark: #071935;
    --light: #f4f6fc;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(13, 44, 88, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    color-scheme: dark;
    --primary: #5da3ff;
    --primary-light: #93c5fd;
    --light: #071224;
    --white: #0a1b32;
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-bg: rgba(10, 27, 50, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    --box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--white) !important;
    color: var(--text-dark) !important;
    border-color: var(--glass-border) !important;
}

[data-theme="dark"] option {
    background-color: var(--white) !important;
    color: var(--text-dark) !important;
}

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

body {
    font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
    background-color: var(--light);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'PeydaFaNum', sans-serif;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #ffffff;
}

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1440px !important;
    margin: 2rem auto;
    padding: 0 1.5rem !important;
}

/* Glowing Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-weight: bold;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'IRANSansXFaNum', sans-serif;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    box-shadow: 0 0 15px rgba(13, 44, 88, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    box-shadow: 0 0 15px rgba(255, 150, 6, 0.4);
    transform: translateY(-2px);
}

.btn-light {
    background-color: rgba(13, 44, 88, 0.05);
    color: var(--primary);
}

[data-theme="dark"] .btn-light {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-light:hover {
    background-color: rgba(13, 44, 88, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Header & Navigation */
header.main-header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 1.5rem;	
    transition: var(--transition);
}

.header-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

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

.nav-menu {
    display: flex;
    gap: 1.2rem;
    list-style: none;
}

.nav-menu a {
    font-weight: bold;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: rgba(13, 44, 88, 0.08);
}

/* Hero Section */
.hero {
    padding: 6rem 2rem !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(13, 44, 88, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(255, 150, 6, 0.03) 0%, transparent 50%);
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 0;
    }
    .hero-img {
        order: -1;
    }
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .hero-actions {
        justify-content: center;
    }
}

.hero-img img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Campaign Card */
.campaign-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.campaign-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(13, 44, 88, 0.12);
}

.campaign-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary);
    color: #fff;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}

.campaign-badge.reward { background-color: var(--info); }
.campaign-badge.equity { background-color: var(--primary); }
.campaign-badge.debt { background-color: var(--warning); }
.campaign-badge.donation { background-color: var(--success); }

.campaign-img {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.campaign-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.campaign-card:hover .campaign-img img {
    transform: scale(1.08);
}

.campaign-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.campaign-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.campaign-card-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.campaign-card-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Progress bar */
.progress-container {
    margin-bottom: 1rem;
}

.progress-bar-wrapper {
    height: 8px;
    background-color: rgba(13, 44, 88, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .progress-bar-wrapper {
    background-color: rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-hover));
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: bold;
}

.campaign-card-footer {
    border-top: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(13, 44, 88, 0.01);
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

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

.sidebar {
    background-color: var(--white);
    border-left: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
}

.profile-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.profile-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
    background-color: rgba(13, 44, 88, 0.06);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sidebar-menu li.active a, .sidebar-menu a:hover {
    background-color: rgba(13, 44, 88, 0.05);
    color: var(--primary);
}

[data-theme="dark"] .sidebar-menu li.active a, [data-theme="dark"] .sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dashboard-content {
    padding: 2rem 3rem;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 1.5rem;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-val {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0.5rem 0;
}

[data-theme="dark"] .stat-val {
    color: #fff;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background-color: rgba(13, 44, 88, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.stat-card.secondary .stat-icon {
    background-color: rgba(255, 150, 6, 0.08);
    color: var(--secondary);
}

/* Wizard / Step Campaign Builder */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(13, 44, 88, 0.05);
    z-index: 1;
    transform: translateY(-50%);
}

.wizard-step {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--white);
    border: 3px solid rgba(13, 44, 88, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
    transition: var(--transition);
}

.wizard-step.active {
    border-color: var(--secondary);
    background-color: var(--secondary);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 150, 6, 0.4);
}

.wizard-step.completed {
    border-color: var(--primary);
    background-color: var(--primary);
    color: #fff;
}

/* Card-to-card Box styling */
.card-to-card-box {
    background: linear-gradient(135deg, #0d2c58 0%, #1a4985 100%);
    border-radius: 20px;
    padding: 2rem;
    color: #fff;
    box-shadow: 0 15px 35px rgba(13, 44, 88, 0.25);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.card-to-card-box::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.card-number-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    direction: ltr;
}

.copy-btn {
    background-color: var(--secondary);
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'IRANSansXFaNum', sans-serif;
}

.copy-btn:hover {
    background-color: var(--secondary-hover);
    transform: scale(1.05);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    background-color: var(--white);
    color: var(--text-dark);
    font-family: 'IRANSansXFaNum', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(13, 44, 88, 0.1);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(255, 150, 6, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.category-card {
    background-color: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 15px 35px rgba(255, 150, 6, 0.08);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    color: var(--secondary);
    transform: scale(1.1);
}

.category-card span {
    font-weight: bold;
    display: block;
}

/* Notification Popups */
.notifications-icon {
    position: relative;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-dark);
}

.notifications-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Messages */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-msg {
    background-color: var(--white);
    border-right: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(-120%);
    animation: slideIn 0.3s forwards;
    min-width: 300px;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

.toast-msg.success { border-right-color: var(--success); }
.toast-msg.danger { border-right-color: var(--danger); }
.toast-msg.warning { border-right-color: var(--warning); }

/* Messenger */
.chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 600px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.chat-users-list {
    border-left: 1px solid var(--glass-border);
    overflow-y: auto;
    background-color: rgba(13, 44, 88, 0.01);
}

.chat-user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.chat-user-item:hover, .chat-user-item.active {
    background-color: rgba(13, 44, 88, 0.04);
}

.chat-messages-area {
    display: flex;
    flex-direction: column;
	padding: 10px;
    height: 100%;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: rgba(13, 44, 88, 0.005);
}

.message-bubble {
    max-width: 65%;
    padding: 0.8rem 1.2rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-bubble.sent {
    background-color: var(--primary);
    color: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-bubble.received {
    background-color: rgba(13, 44, 88, 0.06);
    color: var(--text-dark);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-wrapper {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 1rem;
}

/* Footer Section */
footer.main-footer {
    background-color: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 5rem 0 2rem 0;
    border-top: 5px solid var(--secondary);
}

footer.main-footer h4 {
    color: #fff;
    margin-bottom: 1.5rem;
}

footer.main-footer a {
    color: rgba(255,255,255,0.6);
}

footer.main-footer a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 2rem !important;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Tabs */
.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 2rem;
    gap: 1rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-family: 'PeydaFaNum', sans-serif;
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

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

[data-theme="dark"] .tab-btn:hover, [data-theme="dark"] .tab-btn.active {
    color: #fff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* Table Style */
.table-wrapper {
    overflow-x: auto;
    background-color: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.table th {
    background-color: rgba(13, 44, 88, 0.03);
    color: var(--primary);
    font-weight: bold;
    padding: 1rem 1.5rem;
    text-align: right;
    border-bottom: 2px solid var(--glass-border);
}

[data-theme="dark"] table.table th {
    background-color: rgba(255, 255, 255, 0.02);
    color: #fff;
}

table.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-dark);
}

table.table tr:last-child td {
    border-bottom: none;
}

/* Responsive elements */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

/* Responsive Grids for Campaign Pages */
.grid-campaign-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

.grid-campaign-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

@media (max-width: 992px) {
    .grid-campaign-hero, .grid-campaign-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    
    /* Header layout for mobile */
    .header-nav-wrapper {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1.2rem;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 0.5rem;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu li {
        white-space: nowrap;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Hero section on mobile */
    .hero {
        padding: 3rem 0;
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Dashboard structure for mobile */
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-left: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 1rem;
    }
    
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-menu li {
        flex-shrink: 0;
    }
    
    .sidebar-menu a {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }
    
    /* Chat for mobile */
    .chat-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .chat-users-list {
        max-height: 150px;
        border-left: none;
        border-bottom: 1px solid var(--glass-border);
    }
    
    /* Tables scrolling */
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
    }
}

/* Cards & Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50px;
    text-align: center;
}

.badge-success { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-danger { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-warning { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-info { background-color: rgba(59, 130, 246, 0.15); color: var(--info); }

/* --- Mobile Responsiveness Updates --- */

/* Menu toggle hamburger button styling */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    order: 1;
    z-index: 1001;
}

[data-theme="dark"] .menu-toggle {
    color: #ffffff;
}

/* Responsive Grid-2 helper classes for dashboard and admin layout panels */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.responsive-grid-2.sidebar-main {
    grid-template-columns: 320px 1fr;
}

.responsive-grid-2.sidebar-main-rev {
    grid-template-columns: 1fr 320px;
}

.responsive-grid-2.main-sidebar-450 {
    grid-template-columns: 1fr 450px;
}

.responsive-grid-2.pages-grid {
    grid-template-columns: 1.2fr 1.3fr;
}

.responsive-grid-2.cms-grid {
    grid-template-columns: 1.5fr 1fr;
}

@media (max-width: 992px) {
    .responsive-grid-2,
    .responsive-grid-2.sidebar-main,
    .responsive-grid-2.sidebar-main-rev,
    .responsive-grid-2.main-sidebar-450,
    .responsive-grid-2.pages-grid,
    .responsive-grid-2.cms-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    /* Menu Toggle Hamburger show rules */
    .menu-toggle {
        display: block;
        order: 2 !important;
    }
    
    /* Horizontal force header-nav-wrapper header bar */
    .header-nav-wrapper {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 60px !important;
        padding: 0 1.25rem !important;
        gap: 0 !important;
        position: relative;
        width: 100%;
    }
    
    /* Hamburger drop menu styling */
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--white);
        border-bottom: 2px solid var(--glass-border);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        padding: 1.5rem !important;
        gap: 1.25rem !important;
        z-index: 999;
        overflow-x: hidden !important;
        width: 100% !important;
        align-items: center;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-actions {
        width: auto !important;
        justify-content: flex-end !important;
        gap: 0.5rem !important;
        order: 1 !important;
        margin-right: auto !important;
        margin-left: 0.5rem !important;
    }
    
    /* Hide dashboard text labels on mobile header buttons */
    .nav-actions .btn span {
        display: none !important;
    }
    
    .nav-actions .btn {
        padding: 0 !important;
        width: 28px !important;
        height: 28px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }
    
    .nav-actions .btn i {
        margin: 0 !important;
        font-size: 1rem !important;
    }

    .nav-actions .theme-toggle {
        width: 36px !important;
        height: 36px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        padding: 0 !important;
        border-radius: 50% !important;
    }
}

@media (max-width: 576px) {
    /* Spacing adaptation for small devices */
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem !important;
		margin: 0px auto;
    }
    
    section {
        padding: 2.5rem 0 !important;
    }
    
    /* Override inline paddings to prevent overflow margins */
    div[style*="padding: 3.5rem;"], 
    div[style*="padding: 3rem;"], 
    div[style*="padding: 2.5rem 1.8rem;"],
    div[style*="padding: 2rem;"] {
        padding: 1.25rem !important;
    }
    
    div[style*="gap: 3rem;"], 
    div[style*="gap: 2.5rem;"] {
        gap: 1rem !important;
    }
    
    form[style*="padding: 3rem;"],
    form[style*="padding: 2rem;"] {
        padding: 1.25rem !important;
    }
    
    /* Tab lists scrollable horizontally */
    .tabs-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.4rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabs-nav .tab-btn {
        white-space: nowrap;
    }
    
    /* Table wrap for horizontal scroll touch */
    .table-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    table.table {
        min-width: 600px !important;
    }
}

/* Back to Top Floating Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(13, 44, 88, 0.85);
    color: #ffffff;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(13, 44, 88, 0.15);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .back-to-top {
    background: rgba(93, 163, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary);
    color: #ffffff;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 150, 6, 0.4);
    border-color: transparent;
}

/* --- Hero Statistics Grid --- */
.hero-stats {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.5fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.stats-box {
    background-color: var(--white);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--box-shadow);
    text-align: center;
}

/* --- Search & Filters Grid --- */
.campaigns-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 120px;
    gap: 1.25rem;
    align-items: end;
    width: 100%;
}

/* --- Sidebar Toggle Button --- */
.sidebar-toggle-btn {
    display: none;
}

/* --- Mobile Responsiveness Additions --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    /* Redesigned Tab Navigation as a modern segmented button grid on mobile/tablet */
    .tabs-nav {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
        background: var(--light) !important;
        padding: 0.6rem !important;
        border-radius: var(--border-radius) !important;
        border: 1px solid var(--glass-border) !important;
        margin-bottom: 2rem !important;
    }
    
    .tabs-nav .tab-btn {
        width: 100% !important;
        padding: 0.75rem 0.4rem !important;
        border-radius: 12px !important;
        font-size: 0.85rem !important;
        text-align: center !important;
        border: 1px solid var(--glass-border) !important;
        margin-bottom: 0 !important;
        white-space: normal !important;
        background: var(--white) !important;
        color: var(--text-muted) !important;
        box-shadow: var(--box-shadow) !important;
        transition: var(--transition) !important;
    }
    
    .tabs-nav .tab-btn.active {
        background: var(--primary) !important;
        color: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 4px 15px rgba(13, 44, 88, 0.2) !important;
    }
}

@media (max-width: 768px) {
    /* 1. Statistics layout on mobile */
    .hero-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .hero-stats .stats-box.full-width {
        grid-column: span 2 !important;
    }
    
    /* 2. Search filters wrapper on mobile */
    .campaigns-filter-form {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .campaigns-filter-form button {
        height: 48px !important;
    }
    
    /* 3. Typography header sizes on mobile */
    h1, .hero-content h1, h1[style*="font-size:"] {
        font-size: 1.9rem !important;
    }
    
    h2, h2[style*="font-size:"] {
        font-size: 1.3rem !important;
    }
    
    /* 4. Force flex column to stack layout blocks on mobile */
    .grid-campaign-hero, 
    .grid-campaign-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 5. Prevent overflow & enforce word-wrap in campaign panels and card wrappers */
    #payment-panel, 
    .tab-pane,
    #story-tab,
    #dataroom-tab,
    #updates-tab,
    #comments-tab,
    .campaign-card {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Redesigned Tab Pane card styling on mobile */
    .tab-pane > div {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        box-shadow: none !important;
        border: 1px solid var(--glass-border) !important;
    }

    /* Redesigned comments list cards on mobile */
    #comments-tab div[style*="border-bottom: 1px solid"] {
        background-color: var(--light) !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        border-bottom: none !important;
        margin-bottom: 0.8rem !important;
    }

    /* Redesigned updates items on mobile */
    #updates-tab div[style*="border-right: 4px solid"] {
        padding: 1rem !important;
        border-radius: 8px !important;
        margin-bottom: 0.8rem !important;
    }

    
    /* 6. Overwrite card-number font size and spacing to prevent stretching */
    .card-number-wrapper {
        font-size: 1.15rem !important;
        gap: 0.4rem !important;
        letter-spacing: 0.5px !important;
        padding: 0.75rem !important;
        margin: 1rem 0 !important;
        flex-wrap: wrap !important;
        direction: ltr !important;
        justify-content: center !important;
    }
    
    /* 7. Override heavy desktop paddings and margins on mobile */
    div[style*="padding: 2rem;"],
    div[style*="padding: 2.5rem;"],
    div[style*="padding: 3rem;"],
    div[style*="padding: 3.5rem;"],
    div[style*="padding: 2.5rem 1.8rem;"],
    main[style*="padding: 5rem"],
    main[style*="padding: 4rem"] {
        padding: 1rem !important;
    }
    
    /* 8. Make cover image container in campaign page resize beautifully on mobile */
    div[style*="height: 400px;"] {
        height: 220px !important;
    }
    
    /* 9. Override nested double column grids on mobile */
    div[style*="grid-template-columns: 1fr 1fr;"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 10. Sidebar toggles and vertical stacking on mobile */
    .sidebar-toggle-btn {
        display: block !important;
        width: 100%;
        padding: 0.9rem;
        background-color: var(--primary);
        color: #ffffff !important;
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        font-family: inherit;
        font-weight: bold;
        font-size: 0.95rem;
        cursor: pointer;
        text-align: center;
        margin-bottom: 1.2rem;
        box-shadow: var(--box-shadow);
        transition: var(--transition);
    }
    
    .sidebar-toggle-btn:hover {
        background-color: var(--secondary);
    }
    
    .sidebar-menu {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.5rem !important;
        padding: 0.5rem 0 !important;
        overflow-x: visible !important;
        height: auto !important;
    }
    
    .sidebar-menu.mobile-open {
        display: flex !important;
    }
    
    .sidebar-menu li {
        width: 100% !important;
    }
    
    .sidebar-menu a {
        display: block !important;
        width: 100% !important;
        padding: 0.8rem 1.2rem !important;
        border-radius: 8px !important;
        background-color: var(--light);
        border: 1px solid var(--glass-border);
        white-space: normal !important;
    }
    
    /* 11. General section outer container wrap fix */
    .dashboard-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .sidebar {
        border-left: none !important;
        border-bottom: 1px solid var(--glass-border) !important;
        padding: 1.25rem !important;
        width: 100% !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

