:root {
    --primary-color: #3b9ca7;
    --primary-hover: #2e7d86;
    --bg-dark-sidebar: #10223d;
    --bg-light: #f4f7f6;
    --surface-white: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --border-color: #e2e8f0;
    --success: #2ec17b;
    --danger: #e53e3e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

/* Authentication Layout Structure */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: var(--surface-white);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.auth-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.brand {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--bg-dark-sidebar);
    margin-bottom: 16px;
}

/* Form Layout Components */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-actions a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Button Component Kit */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

.btn-sm {
    width: auto;
    padding: 6px 16px;
    font-size: 13px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
}

.auth-footer .btn {
    margin-top: 8px;
}

.admin-shortcut {
    margin-top: 15px;
    font-size: 12px;
    width: 100%;
    text-align: center;
}

/* Lock Icon For Verification Components */
.lock-icon-wrapper {
    width: 70px;
    height: 70px;
    background: #eef7f8;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
}

.custom-lock {
    font-size: 32px;
    color: var(--primary-color);
}

/* Sidebar Framework Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background-color: var(--bg-dark-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    height: 100%;
}

.sidebar-menu a {
    color: rgba(255,255,255,0.65);
    padding: 12px 24px;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    color: #fff;
    background-color: rgba(255,255,255,0.08);
}

.sidebar-menu .logout-link {
    margin-top: auto;
}

/* Navigation Top Navbar Layout */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background: var(--surface-white);
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid var(--border-color);
}

.view-title {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.notification-bell {
    position: relative;
    font-size: 20px;
    cursor: pointer;
}

.notification-bell .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
}

.user-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Top dropdown menus */
.top-dropdown {
    position: absolute;
    width: 200px;
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 10px;
    z-index: 9999;
    overflow: hidden;
}
.top-dropdown.hidden { display: none; }
.top-dropdown .menu-header { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 10px 14px 8px; border-bottom: 1px solid var(--border-color); }
.top-dropdown .menu-item { display: flex; align-items: center; padding: 10px 14px; color: var(--text-primary); text-decoration: none; font-size: 14px; transition: background 0.15s; cursor: pointer; }
.top-dropdown .menu-item:hover { background: #f6f8fa; }
.top-dropdown .menu-item-danger { color: #ef4444; }
.top-dropdown .menu-item-danger:hover { background: #fff5f5; }

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.content-body {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Metric Components */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--surface-white);
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
}

.metric-card span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-card h2 {
    margin-top: 6px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.metric-card .metric-icon {
    font-size: 20px;
    margin-bottom: 8px;
    opacity: 0.7;
}

/* Section Controls */
.section-title {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.tool-card {
    background: var(--surface-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.15s;
}

.tool-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* Thumbnail — fixed aspect ratio so image always fills cleanly */
.tool-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.tool-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tool-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 40px;
}

/* Card content below thumbnail */
.tool-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Admin card action row */
.tool-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.btn-sm-outline {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
}
.btn-sm-outline:hover { background: var(--primary-color); color: #fff; }

.btn-sm-danger {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ef4444;
    color: #ef4444;
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
}
.btn-sm-danger:hover { background: #ef4444; color: #fff; }

.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tool-header i {
    font-size: 24px;
}

.whatsapp-icon { color: #25D366; }
.mail-icon { color: var(--primary-color); }
.partnership-icon { color: #4f46e5; }
.conversion-icon { color: #0891b2; }

.tool-card-body p,
.tool-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 36px;
}

.btn-tool {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: auto;
}

.btn-tool:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

/* User Specific Access Card Additions */
.tool-status-ribbon {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.tool-status-ribbon.status-active { background: #e6f9f0; color: var(--success); }
.tool-status-ribbon.status-inactive { background: #fee2e2; color: var(--danger); }

.user-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    margin-top: 10px;
}

/* Profile Layout Configurations Split Elements */
.settings-split-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
}

.settings-profile-sidebar {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.profile-large-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid #eef7f8;
}

/* Initials avatar — replaces photo */
.profile-initials-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    letter-spacing: 1px;
}

.profile-email-display {
    font-size: 12px;
    margin-top: 6px;
    word-break: break-all;
}

/* Small initials avatar in top navbar */
.nav-initials-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    cursor: pointer;
}

/* Profile info rows */
.profile-info-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.profile-info-row:last-child { border-bottom: none; }

.profile-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

.profile-info-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.profile-info-value {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Data View Tables */
.table-container {
    background: var(--surface-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

th, td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #fafafa;
    font-weight: 600;
    color: var(--text-muted);
}

.table-header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-active { background: #e6f9f0; color: var(--success); }
.status-inactive { background: #feefee; color: var(--danger); }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-right: 8px;
    color: var(--text-muted);
}

/* Action Shortcut Metrics Grid */
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.action-shortcut-card {
    background: var(--surface-white);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.action-shortcut-card:hover {
    border-color: var(--primary-color);
}

.action-shortcut-card h5 { font-size: 14px; margin-bottom: 4px; }
.action-shortcut-card p { font-size: 12px; color: var(--text-muted); }

/* Activity Log Controls Layout Utilities */
.logs-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    background: var(--surface-white);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.search-input-wrapper input:focus { border-color: var(--primary-color); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }

.filter-dropdowns select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--surface-white);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.resource-tag {
    background-color: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.badge-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-info { background-color: #e0f2fe; color: #0369a1; }
.badge-warning { background-color: #fef3c7; color: #b45309; }
.badge-danger { background-color: #fee2e2; color: #b91c1c; }

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 4px;
}

.pagination-buttons { display: flex; gap: 6px; }

.btn-pagination {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-pagination:hover:not(.disabled):not(.active) { border-color: var(--primary-color); color: var(--primary-color); }
.btn-pagination.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.btn-pagination.disabled { opacity: 0.5; cursor: not-allowed; }

/* Dynamic Configurations Containers */
.form-container-card {
    background: var(--surface-white);
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    border: 1px solid var(--border-color);
}

.form-container-card h3 { margin-bottom: 20px; }

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
}

.upload-zone i { font-size: 32px; margin-bottom: 8px; color: var(--primary-color); }
.form-buttons { display: flex; gap: 12px; margin-top: 10px; }
.form-buttons .btn { width: auto; }

/* Product Details Viewports */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.details-card { background: var(--surface-white); padding: 30px; border-radius: 8px; border: 1px solid var(--border-color); max-width: 700px; }
.details-main { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.details-large-icon { font-size: 64px; color: var(--success); }
.details-metadata { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.meta-item { display: flex; justify-content: space-between; font-size: 14px; }
.link-span { color: var(--primary-color); cursor: pointer; }

/* Rocket Launch Interface Card Layout */
.launch-success-card {
    background: var(--surface-white);
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
    border: 1px solid var(--border-color);
}

.rocket-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto 24px; }
.rocket-icon { font-size: 70px; color: #38bdf8; }
.success-check { position: absolute; bottom: 4px; right: 4px; font-size: 24px; color: var(--success); background: white; border-radius: 50%; }
.launch-success-card h2 { font-size: 24px; margin-bottom: 8px; }
.launch-success-card p { color: var(--text-muted); margin-bottom: 16px; }
.launch-url { color: var(--success); text-decoration: none; font-weight: 600; display: block; margin-bottom: 24px; }
.launch-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Global Utilities */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-4 { margin-top: 1.5rem; }

@media (max-width: 768px) {
    .settings-split-container { grid-template-columns: 1fr; }
    .form-row-grid { grid-template-columns: 1fr; }
    .app-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}
/* ── Open Tool & View buttons (admin dashboard cards) ── */
.btn-sm-tool {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #10b981;
    color: #10b981;
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background .18s, color .18s;
}
.btn-sm-tool:hover { background: #10b981; color: #fff; }

.btn-sm-view {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #f59e0b;
    color: #f59e0b;
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background .18s, color .18s;
}
.btn-sm-view:hover { background: #f59e0b; color: #fff; }

/* ── Product View Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--bg-primary, #fff);
    border-radius: 14px;
    width: 480px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity:0; transform:translateY(-18px) scale(.97); }
    to   { opacity:1; transform:none; }
}
.modal-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.modal-thumb-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary, #f4f4f4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted, #aaa);
}
.modal-body {
    padding: 24px;
}
.modal-body h3 { margin: 0 0 6px; font-size: 18px; }
.modal-meta { font-size: 12px; color: var(--text-muted,#888); margin-bottom: 12px; }
.modal-desc { font-size: 14px; color: var(--text-secondary,#555); margin-bottom: 20px; line-height:1.6; }
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
