/* ============================================
   QEXO — Base Styles (RTL-first)
   ============================================ */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #06b6d4;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

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

a:hover {
    text-decoration: underline;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    background: var(--white);
    border-block-end: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-menu a {
    color: var(--gray-600);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    white-space: nowrap;
}

.navbar-menu a:hover {
    color: var(--primary);
    text-decoration: none;
}
.navbar-admin-link {
    color: var(--warning) !important;
    font-weight: 600;
}
.navbar-admin-link:hover {
    color: var(--primary) !important;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: 0.3s;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.625rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: var(--gray-200);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-code {
    font-weight: 500;
    color: var(--gray-700);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    margin-top: 0.25rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 140px;
    z-index: 200;
    display: none;
}

.lang-dropdown.active {
    display: block;
}

.lang-form {
    margin: 0;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.15s;
}

.lang-option:hover {
    background: var(--gray-50);
}

.lang-name {
    flex: 1;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

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

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

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

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-block-end: 1rem;
}

.form-label {
    display: block;
    margin-block-end: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-block-start: 0.25rem;
}

.form-hint {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-block-start: 0.25rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-block-end: 0.5rem;
    color: var(--gray-900);
}

.card-text {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-block-end: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ============================================
   Auth Layout
   ============================================ */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.auth-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
}

.auth-logo {
    text-align: center;
    margin-block-end: 1.5rem;
}

.auth-logo h1 {
    color: var(--primary);
    font-size: 2rem;
}

.auth-footer {
    text-align: center;
    margin-block-start: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================
   Dashboard Grid
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-block-start: 1.5rem;
}

.dashboard-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.dashboard-card-icon {
    font-size: 2rem;
    margin-block-end: 0.75rem;
}

.dashboard-card h3 {
    color: var(--gray-900);
    margin-block-end: 0.25rem;
}

.dashboard-card p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    margin-block: 1.5rem 1rem;
}

.page-header h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    margin-block-start: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.8rem;
    border-block-start: 1px solid var(--gray-200);
}

/* ============================================
   Branding Module
   ============================================ */
.brand-overview {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.brand-logo-section {
    text-align: center;
}

.brand-logo-img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    background: var(--white);
}

.brand-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
}

.brand-info-section h3 {
    font-size: 1.3rem;
    color: var(--gray-900);
}

.color-edit-form .color-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.color-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.color-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-hex {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.mockup-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-block-start: 0.75rem;
}

.mockup-template-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.6rem;
    box-shadow: var(--shadow);
}

.mockup-template-stage {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 4 / 3;
}

.mockup-template-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mockup-generated {
    object-fit: contain;
}

.mockup-template-logo {
    position: absolute;
    z-index: 2;
    object-fit: contain;
    max-height: 45%;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.35));
}

.mockup-template-stage.is-photo .mockup-template-logo {
    mix-blend-mode: multiply;
    opacity: 0.9;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.22)) contrast(1.04) saturate(0.95);
}

.mockup-template-logo--tshirt {
    transform: translate(-50%, -50%) rotate(0deg) perspective(700px) rotateX(8deg) !important;
    max-height: 40%;
}

.mockup-template-logo--cup {
    transform: translate(-50%, -50%) rotate(-6deg) perspective(700px) rotateY(-10deg) !important;
    max-height: 38%;
    opacity: 0.88;
}

.mockup-template-logo--bizcard {
    transform: translate(-50%, -50%) rotate(-7deg) perspective(700px) rotateX(4deg) !important;
    max-height: 36%;
    opacity: 0.92;
}

.mockup-template-stage.is-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 34%, rgba(0, 0, 0, 0.06));
}

/* Mockup Grid */
.mockup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.4rem;
    margin-block-start: 1rem;
}

.mockup-card {
    text-align: center;
}

.mockup-container {
    background: linear-gradient(145deg, #f5f7fb, #eef2f7);
    border-radius: 16px;
    padding: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    position: relative;
    overflow: hidden;
    border: 1px solid #d8e0eb;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.mockup-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 42%);
    pointer-events: none;
}

.mockup-shape {
    position: relative;
    z-index: 1;
}

.mockup-logo {
    filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.2));
}

.mockup-label {
    margin-block-start: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.92rem;
}

/* Cup mockup */
.cup-shape {
    width: 118px;
    height: 150px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f5fa 100%);
    border-radius: 8px 8px 26px 26px;
    border: 1px solid #cfd8e4;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 16px 24px rgba(15, 23, 42, 0.2);
    transform: perspective(600px) rotateY(-8deg);
}

.cup-shape::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8fafc, #e7edf6);
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.1);
}

.cup-shape .mockup-logo {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

/* T-shirt mockup */
.tshirt-shape {
    width: 150px;
    height: 165px;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    border: 1px solid #ced7e3;
    border-radius: 14px;
    clip-path: polygon(28% 0%, 72% 0%, 80% 10%, 100% 18%, 90% 36%, 80% 30%, 80% 100%, 20% 100%, 20% 30%, 10% 36%, 0% 18%, 20% 10%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block-start: 1.2rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
    transform: perspective(600px) rotateX(5deg);
}

.tshirt-shape::before {
    content: '';
    position: absolute;
    inset: 18px 22px auto;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.tshirt-shape .mockup-logo {
    max-width: 68px;
    max-height: 68px;
    object-fit: contain;
}

/* Business card mockup */
.bizcard-shape {
    width: 198px;
    height: 122px;
    background: linear-gradient(155deg, #ffffff, #f4f7fc);
    border-radius: 12px;
    border: 1px solid #d9e1ec;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.9rem;
    border-block-start: 4px solid var(--brand-primary, var(--primary));
    transform: rotate(-6deg);
}

.bizcard-shape::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.7) 46%, rgba(255, 255, 255, 0) 58%);
    border-radius: inherit;
    pointer-events: none;
}

.bizcard-shape .mockup-logo {
    max-width: 52px;
    max-height: 32px;
    object-fit: contain;
}

.bizcard-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-800);
}

.bizcard-phone {
    font-size: 0.63rem;
    color: var(--gray-500);
}

/* Wall sign mockup */
.wall-shape {
    width: 184px;
    height: 128px;
    background: linear-gradient(160deg, #f8fafc, #e2e8f0);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
    border: 1px solid #cbd5e1;
    transform: perspective(700px) rotateX(8deg) rotateY(-8deg);
}

.wall-shape .mockup-logo {
    max-width: 72px;
    max-height: 54px;
    object-fit: contain;
}

.wall-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: 0.5px;
}

/* Storefront mockup */
.store-shape {
    width: 198px;
    height: 148px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
    border: 1px solid #cdd6e2;
    border-radius: 8px 8px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    position: relative;
    padding-block-start: 1.6rem;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
}

.store-shape::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0) 62%);
    border-radius: inherit;
    pointer-events: none;
}

.store-awning {
    position: absolute;
    top: -14px;
    inset-inline-start: -1px;
    inset-inline-end: -1px;
    height: 24px;
    background: repeating-linear-gradient(
        90deg,
        var(--brand-primary, var(--primary)),
        var(--brand-primary, var(--primary)) 20px,
        var(--brand-secondary, var(--secondary)) 20px,
        var(--brand-secondary, var(--secondary)) 40px
    );
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.store-shape .mockup-logo {
    max-width: 72px;
    max-height: 42px;
    object-fit: contain;
}

.store-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .brand-overview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mockup-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ============================================
   Data Tables
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: start;
    border-block-end: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-block-end: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* ============================================
   Landing Page Builder
   ============================================ */
.template-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-block-start: 0.5rem;
}

.template-card {
    cursor: pointer;
}

.template-card-inner {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.template-card.selected .template-card-inner,
.template-card-inner:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.template-preview {
    font-weight: 500;
    color: var(--gray-700);
}

.template-gallery { margin-block-end: 0; }
.template-category { margin-block-end: 1.5rem; }
.template-category:last-child { margin-block-end: 0; }
.template-category-title {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-block-end: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.template-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.template-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.template-preview-img img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 6px;
}
.template-preview-mini {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 6px;
    overflow: hidden;
    background: var(--gray-100);
}
.template-mini-hero {
    display: block;
    height: 60%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 6px 6px 0 0;
}
.template-preview-hero_split .template-mini-hero { height: 50%; }
.template-mini-split {
    display: block;
    height: 50%;
    background: linear-gradient(90deg, var(--gray-200) 45%, var(--gray-100) 45%);
}
.template-preview-hero_cards .template-mini-hero { height: 35%; }
.template-mini-cards {
    display: flex;
    gap: 4px;
    padding: 6px;
    height: 65%;
}
.template-mini-cards::before,
.template-mini-cards::after {
    content: '';
    flex: 1;
    background: var(--gray-200);
    border-radius: 4px;
}
.template-preview-hero_minimal .template-mini-hero { background: var(--gray-800); height: 100%; }
.template-preview-aurora .template-mini-hero { background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899); height: 100%; border-radius: 6px; }
.template-preview-prestige .template-mini-hero { background: linear-gradient(180deg, #1f2937 60%, #374151 100%); height: 100%; border-radius: 6px; }
.template-preview-prestige .template-mini-hero::after { content: ''; display: block; height: 3px; background: linear-gradient(90deg, #f59e0b, #d97706); }
.template-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
}
.form-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-block-end: 0.5rem;
}
.form-row input { flex: 1; min-width: 120px; }
.offer-row { margin-block-end: 0.75rem; }
.flex-wrap { flex-wrap: wrap; }

/* Image grid in edit page */
.image-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.image-thumb {
    position: relative;
    width: 120px;
}

.image-thumb img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.image-remove {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--danger);
    cursor: pointer;
    margin-block-start: 0.25rem;
}

@media (max-width: 768px) {
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* ============================================
   Onboarding Wizard
   ============================================ */
.onboarding-wrapper {
    display: flex;
    justify-content: center;
    padding-block: 2rem;
}

.onboarding-card {
    max-width: 600px;
    width: 100%;
}

.onboarding-step {
    display: none;
}

.onboarding-step.active {
    display: block;
}

.step-title {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-block-end: 1.25rem;
    padding-block-end: 0.75rem;
    border-block-end: 1px solid var(--gray-200);
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-block-start: 1.5rem;
}

.step-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-block-start: 1.5rem;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.step-dot.active {
    background: var(--primary);
    color: var(--white);
}

.color-row {
    display: flex;
    gap: 1.5rem;
}

.color-row input[type="color"] {
    width: 60px;
    height: 40px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 2px;
}

/* ============================================
   Marketing Board
   ============================================ */
.week-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.week-board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-block-start: 1rem;
}

.day-column {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.day-column.today {
    box-shadow: 0 0 0 2px var(--primary), var(--shadow-sm);
}

.day-header {
    background: var(--gray-50);
    padding: 0.75rem;
    text-align: center;
    border-radius: var(--radius) var(--radius) 0 0;
    border-block-end: 1px solid var(--gray-200);
}

.day-name {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
}

.day-date {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.day-column.today .day-header {
    background: var(--primary);
}

.day-column.today .day-name,
.day-column.today .day-date {
    color: var(--white);
}

.day-tasks {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.no-tasks {
    color: var(--gray-400);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem 0;
}

.task-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 6px;
    transition: all 0.2s;
}

.task-item:hover {
    background: var(--gray-100);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-desc {
    text-decoration: line-through;
}

.task-checkbox {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.task-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.task-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-400);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.task-checkbox input:checked + .checkmark::after {
    content: '\2713';
    color: white;
    font-size: 12px;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-block-end: 0.25rem;
    font-size: 0.75rem;
}

.task-time {
    color: var(--gray-600);
    font-weight: 500;
}

.task-type {
    color: var(--gray-500);
}

.platform-badge {
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
}

.platform-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.platform-facebook {
    background: #1877F2;
}

.platform-tiktok {
    background: #000000;
}

.task-desc {
    font-size: 0.8rem;
    color: var(--gray-700);
    line-height: 1.4;
    word-break: break-word;
}

/* Mobile - stack days vertically */
@media (max-width: 1024px) {
    .week-board {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

    .day-column {
        min-height: auto;
    }

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

    .day-tasks {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .task-item {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 150px;
    }
}

/* ============================================
   AI Content Assistant
   ============================================ */
.ai-generator {
    max-width: 800px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

#generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.ai-result {
    margin-block-start: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-block-end: 0.75rem;
}

.ai-result-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-700);
}

.ai-result-content {
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.ai-history {
    max-width: 800px;
}

.ai-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-history-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.ai-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-block-end: 0.5rem;
}

.ai-history-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.ai-history-prompt {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-block-end: 0.5rem;
}

.ai-history-result {
    margin-block-end: 0.5rem;
}

.ai-history-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-block-end: 0.75rem;
}

.ai-history-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.ai-history-preview,
.ai-history-full {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-800);
}

.ai-history-full {
    white-space: pre-wrap;
}

.toggle-full {
    padding: 0;
    font-size: 0.8rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

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

.ai-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-block-start: 0.5rem;
}

.copy-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* ============================================
   Landing Page Settings (organized, mobile-friendly)
   ============================================ */
.landing-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.landing-settings-group {
    padding: 1rem 0;
    border-block-end: 1px solid var(--gray-200);
}
.landing-settings-group:last-child {
    border-block-end: none;
    padding-block-end: 0;
}
.landing-settings-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-block-end: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.landing-settings-group-title::before {
    content: '';
    width: 4px;
    height: 1.2em;
    background: var(--primary);
    border-radius: 2px;
}
.landing-settings-fields {
    display: grid;
    gap: 1rem;
}
.landing-settings-fields.form-grid-2 {
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .landing-settings-fields.form-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 768px) {
    .landing-settings-fields.form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .landing-settings-fields.form-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}
.landing-settings .form-input,
.landing-settings select.form-input {
    min-height: 44px;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}
.landing-settings .form-hint {
    margin-block-start: 0.25rem;
}
@media (max-width: 600px) {
    .card {
        padding: 1rem;
    }
    .landing-settings-group {
        padding: 0.75rem 0;
    }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.d-block { display: block; }
.mt-1 { margin-block-start: 0.5rem; }
.mt-2 { margin-block-start: 1rem; }
.mt-3 { margin-block-start: 1.5rem; }
.mb-1 { margin-block-end: 0.5rem; }
.mb-2 { margin-block-end: 1rem; }
.mb-3 { margin-block-end: 1.5rem; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-block-start: 0.5rem;
        align-items: stretch;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        padding: 0.5rem 0;
        border-block-end: 1px solid var(--gray-100);
    }

    .navbar-menu .lang-switcher {
        order: -1;
        margin-block-end: 0.5rem;
    }

    .lang-dropdown {
        position: static;
        border: none;
        box-shadow: none;
        background: var(--gray-50);
        margin-top: 0.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
