﻿:root {
    --bg-body: #0f1117;
    --bg-navbar: #1c1e26;
    --bg-card: #1c1e26;
    --bg-card-alt: #1a1c23;
    --bg-input: #0f1117;
    --bg-table-row: #1c1e26;
    --bg-table-row-hover: #252630;
    --bg-table-row-selected: #1e3a5f;
    --text-main: #ffffff;
    --text-muted: #8b92a7;
    --text-label: #6b7280;
    --accent-green: #3b82f6;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-orange: #f59e0b;
    --border-color: #2d2f3a;
    --row-highlight: #3b82f6;
    --radius: 4px;
    --scrollbar-bg: #1a1b21;
    --scrollbar-thumb: #3d3f4a;
}

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

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4d4f5a;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background-color: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    margin-right: 12px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
    background-color: var(--bg-input);
}

.nav-link.active {
    color: var(--accent-blue);
    background-color: rgba(59, 130, 246, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.btn {
    padding: 9px 16px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn:hover {
    opacity: 0.9;
}

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

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

/* Main Content - Fill entire page */
.main-content {
    padding: 0;
}

/* Table - Smaller for no-scroll layout */
.table-container {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 180px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

th {
    text-align: left;
    color: var(--text-label);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
    letter-spacing: 0.5px;
}

th i {
    margin-left: 4px;
    font-size: 9px;
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

tr:hover td {
    background-color: var(--bg-table-row-hover);
}

tr.selected td {
    background-color: var(--bg-table-row-selected);
    color: var(--text-main);
}

.id-cell {
    color: var(--row-highlight);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.id-cell::before {
    content: '';
    width: 5px;
    height: 5px;
    background-color: var(--row-highlight);
    border-radius: 50%;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.user-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Detail Section */
.detail-section {
    margin-top: 16px;
    padding-top: 0;
}

.detail-container {
    display: flex;
    gap: 20px;
}

/* Profile Card - Left Side - MUCH WIDER */
.profile-card {
    width: 340px;
    min-width: 340px;
    background-color: var(--bg-card-alt);
    padding: 36px 32px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.profile-completion {
    color: var(--text-label);
    font-size: 13px;
    margin-bottom: 24px;
}

.profile-img-lg {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid var(--accent-green);
    padding: 2px;
    display: block;
}

.profile-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 28px;
}

.profile-info {
    text-align: left;
}

.info-group {
    margin-bottom: 22px;
}

.info-label {
    color: var(--text-label);
    font-size: 12px;
    text-transform: capitalize;
    display: block;
    margin-bottom: 6px;
}

.info-value {
    color: var(--text-main);
    font-size: 16px;
    word-break: break-word;
}

/* Edit Form - Right Side - LARGE */
.edit-form {
    flex: 1;
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
}

.tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding: 0 0 0 0;
}

.tab {
    color: var(--text-label);
    font-size: 15px;
    padding-bottom: 14px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    font-weight: 500;
}

.tab:hover {
    color: var(--text-main);
}

.tab.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

/* Individual tab colors */
.tab[data-tab="customer"].active {
    border-bottom-color: var(--accent-blue);
}

.tab[data-tab="notes"].active {
    border-bottom-color: var(--accent-purple);
}

.tab[data-tab="timeline"].active {
    border-bottom-color: var(--accent-orange);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Fields - Better proportions and bigger */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Field sizing - prevent overly long fields */
.form-group-xs {
    width: 100px;
    flex-shrink: 0;
}

.form-group-sm {
    width: 140px;
    flex-shrink: 0;
}

.form-group-md {
    width: 200px;
    flex-shrink: 0;
}

.form-group-lg {
    flex: 1;
    max-width: 300px;
}

.form-group-full {
    flex: 1;
}

.form-group label {
    color: var(--text-label);
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 400;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 16px 16px;
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: rgba(59, 130, 246, 0.05);
}

.form-control::placeholder {
    color: var(--text-label);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Notes Section - Better styling */
.notes-section {
    padding: 0;
}

.add-note {
    margin-bottom: 20px;
}

.add-note textarea {
    resize: vertical;
    min-height: 70px;
    font-size: 14px;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.note-item {
    background-color: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-blue);
    position: relative;
}

.note-date {
    font-size: 11px;
    color: var(--text-label);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-content {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    padding-right: 24px;
}

.note-item .delete-note {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-label);
    cursor: pointer;
    font-size: 11px;
    opacity: 0.6;
    transition: all 0.2s;
}

.note-item .delete-note:hover {
    color: #ef4444;
    opacity: 1;
}

/* Timeline Section - Beautiful improved styling */
.timeline {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

#timeline-list {
    position: relative;
    padding-left: 32px;
}

#timeline-list::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-blue) 0%, var(--accent-purple) 50%, var(--accent-green) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
    margin-left: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-body);
    border: 3px solid var(--accent-blue);
    z-index: 1;
}

.timeline-item.note .timeline-dot {
    border-color: var(--accent-purple);
}

.timeline-item.update .timeline-dot {
    border-color: var(--accent-orange);
}

.timeline-item.create .timeline-dot {
    border-color: var(--accent-green);
}

.timeline-content {
    background-color: var(--bg-input);
    padding: 14px 16px;
    border-radius: var(--radius);
}

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

.timeline-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.timeline-item.note .timeline-type {
    color: var(--accent-purple);
}

.timeline-item.update .timeline-type {
    color: var(--accent-orange);
}

.timeline-item.create .timeline-type {
    color: var(--accent-green);
}

.timeline-date {
    font-size: 11px;
    color: var(--text-label);
}

.timeline-text {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-label);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* 3-Column Grid Layout - No Scroll */
.detail-section {
    margin-top: 12px;
    padding-top: 0;
    height: calc(100vh - 250px);
    overflow: hidden;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 16px;
    height: 100%;
}

/* Profile Card - Compact for grid */
.profile-card {
    width: auto;
    min-width: auto;
    background-color: var(--bg-card-alt);
    padding: 24px 20px;
    border-radius: var(--radius);
    overflow-y: auto;
}

/* Customer Form Section */
.customer-form-section {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    overflow-y: auto;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.form-row-compact {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.form-actions-compact {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Notes & Timeline Section */
.notes-timeline-section {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.compact-section {
    flex-shrink: 0;
}

.add-note-compact {
    margin-bottom: 12px;
}

.add-note-compact textarea {
    margin-bottom: 8px;
}

.notes-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.timeline-compact {
    max-height: 250px;
    overflow-y: auto;
}

/* Adjust form control sizes for compact layout */
.form-control {
    padding: 10px 12px;
    font-size: 13px;
}

.form-group label {
    font-size: 11px;
    margin-bottom: 4px;
}

/* Beautiful Bigger Buttons */
.btn {
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-blue:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--text-label);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
}

/* Form Actions Buttons - Bigger and More Prominent */
.form-actions-compact .btn {
    padding: 14px 24px;
    font-size: 15px;
    min-width: 120px;
}

/* Add Note Button - Full Width and Beautiful */
.add-note-compact .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
    margin-top: 8px;
}

/* 4-Column Grid Layout - Profile | Form | Notes | Timeline */
.detail-grid-4col {
    display: grid;
    grid-template-columns: 260px 1fr 280px 280px;
    gap: 14px;
    height: 100%;
}

/* Table - Show 4-5 customers */
.table-container {
    max-height: 240px;
}

/* Taller Form Fields */
.form-control {
    padding: 14px 14px;
    font-size: 14px;
    height: 48px;
}

textarea.form-control {
    height: auto;
    min-height: 60px;
}

/* Notes Column - Beautiful Styling */
.notes-section-col {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(139, 92, 246, 0.2);
    overflow-y: auto;
}

.notes-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    padding: 14px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent-purple);
    position: relative;
    transition: all 0.3s ease;
}

.note-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Timeline Column - Beautiful Styling */
.timeline-section-col {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(251, 146, 60, 0.05) 100%);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(245, 158, 11, 0.2);
    overflow-y: auto;
}

.timeline-compact {
    max-height: 500px;
    overflow-y: auto;
}

#timeline-list::before {
    background: linear-gradient(180deg, var(--accent-orange) 0%, var(--accent-purple) 50%, var(--accent-blue) 100%);
}

.timeline-item {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Section Title with Icons */
.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--accent-blue);
    font-size: 16px;
}

.notes-section-col .section-title i {
    color: var(--accent-purple);
}

.timeline-section-col .section-title i {
    color: var(--accent-orange);
}

/* Wider 4-Column Grid - More space for Profile and Notes */
.detail-grid-4col {
    display: grid;
    grid-template-columns: 320px 1fr 340px 300px;
    gap: 14px;
    height: 100%;
}

/* Table - Show 5-6 customers */
.table-container {
    max-height: 300px;
}

/* Search Box in Navbar */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 16px;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-label);
    font-size: 14px;
}

.search-box input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 12px 8px 36px;
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 13px;
    width: 220px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    width: 280px;
}

.search-box input::placeholder {
    color: var(--text-label);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-reviewed {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-archived {
    background-color: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Filter Group */
.filter-group select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 13px;
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 12px;
    height: auto;
}

/* Submission Detail */
.submission-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.submission-icon {
    font-size: 36px;
    color: var(--accent-green);
}

.status-select {
    height: 40px;
    font-weight: 500;
}

.preview-cell {
    max-width: 300px;
}

.preview-field {
    display: inline-block;
    margin-right: 8px;
    font-size: 12px;
}

.preview-field strong {
    color: var(--text-label);
}

.source-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-fields {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.timeline-item.received .timeline-dot {
    border-color: var(--accent-green);
}

.timeline-item.received .timeline-type {
    color: var(--accent-green);
}


/* Settings Page Styles */
.settings-page {
    padding: 24px;
}

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

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    color: var(--accent-blue);
}

.settings-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.section-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading i {
    color: var(--accent-purple);
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-box i {
    color: var(--accent-blue);
    font-size: 20px;
    margin-top: 2px;
}

.info-box strong {
    display: block;
    margin-bottom: 4px;
}

.info-box p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

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

.webhook-list {
    margin-bottom: 16px;
}

.webhook-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: 8px;
}

.webhook-item i {
    color: var(--accent-green);
}

.webhook-item .form-control {
    flex: 1;
}

.add-webhook {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.add-webhook .form-control {
    flex: 1;
}

.test-results {
    margin-top: 16px;
    font-size: 12px;
}

.test-result {
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.test-result.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}


.settings-tab-content {
    background: var(--bg-card);
    border-radius: 0 0 12px 12px;
    padding: 28px;
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h2 i {
    color: var(--accent-blue);
    font-size: 16px;
}

.panel-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Ntfy Topic Box */
.ntfy-topic-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.topic-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-label i {
    color: #10b981;
}

.topic-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-row code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 1px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon:hover {
    background: #10b981;
    color: white;
}

/* Quick Setup Steps */
.quick-setup {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.setup-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.setup-step a {
    color: #60a5fa;
    text-decoration: none;
}

/* Advanced Toggle */
.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.advanced-toggle:hover {
    color: var(--text-main);
}

.toggle-arrow {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 12px;
}

.advanced-panel {
    padding-top: 16px;
}

/* Form Components */
.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.flex-1 {
    flex: 1;
}

.form-group label {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control.form-sm {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(107, 114, 128, 0.4);
    border-radius: 24px;
    transition: 0.2s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-switch input:checked+.toggle-slider {
    background: #10b981;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* Badges */
.badge-sm {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Tooltips */
.tooltip {
    color: var(--text-label);
    cursor: help;
}

.tooltip i {
    font-size: 12px;
}

/* Panel Actions */
.panel-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

/* Webhooks Compact */
.webhook-list.compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.webhook-item.compact {
    display: flex;
    gap: 10px;
    align-items: center;
}

.webhook-item.compact .form-control {
    flex: 1;
}

.btn-icon.btn-danger-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-icon.btn-danger-icon:hover {
    background: #ef4444;
    color: white;
}

.add-webhook.compact {
    display: flex;
    gap: 10px;
}

.add-webhook.compact .form-control {
    flex: 1;
}

.empty-msg {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-mini {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 12px;
    border-radius: 10px;
}

.stat-mini .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
}

.stat-mini .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Status Dropdown */
select.form-control,
.status-select,
select {
    background-color: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Prominent Topic Box */
.ntfy-topic-box.prominent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.topic-header i {
    font-size: 14px;
}

.topic-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-input-lg {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 700;
    color: #10b981;
    background: transparent;
    border: none;
    letter-spacing: 1px;
    min-width: 0;
}

.topic-input-lg:focus {
    outline: none;
}

.topic-input-lg::placeholder {
    color: rgba(16, 185, 129, 0.4);
}

.btn-copy {
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 18px;
}

.btn-copy:hover {
    background: #10b981;
    color: white;
    transform: scale(1.05);
}

/* Code Examples */
.code-example {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.code-label {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.code-block {
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    color: #a5b4fc;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
}

.endpoint-placeholder {
    color: #10b981;
    font-weight: 600;
}

/* EmailJS Section */
.emailjs-section {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
}

.emailjs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.emailjs-header i {
    color: #3b82f6;
}

.emailjs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.emailjs-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
}

.emailjs-note a {
    color: #60a5fa;
}

/* Notification Sections */
.notification-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.notification-section:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Section - Green Theme */
.notification-section.mobile-section {
    border-left: 4px solid #10b981;
}

/* Email Section - Blue Theme */
.notification-section.email-section {
    border-left: 4px solid #3b82f6;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.section-icon.mobile {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.section-icon.email {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.section-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.section-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Section Content */
.section-content {
    padding-left: 64px;
}

/* Topic Box */
.topic-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.topic-box .topic-label {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.topic-box .topic-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Setup Steps */
.setup-steps {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.setup-steps .step {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-steps .step a {
    color: #10b981;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Section Note */
.section-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
    margin-bottom: 0;
}

.section-note a {
    color: #60a5fa;
    text-decoration: none;
}

.section-note a:hover {
    text-decoration: underline;
}

/* Radio Group for Checkout Mode */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.radio-option input[type="radio"] {
    margin-top: 2px;
    accent-color: #3b82f6;
}

.radio-option input[type="radio"]:checked+.radio-label strong {
    color: #3b82f6;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-label strong {
    font-size: 14px;
    color: var(--text-main);
}

.radio-label small {
    font-size: 12px;
    color: var(--text-muted);
}

/* Function List for Usage Guide */
.function-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.function-item {
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.function-item code {
    font-size: 13px;
    color: #60a5fa;
    font-family: 'Monaco', 'Menlo', monospace;
}

.function-item p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 0;
}

/* Use Cases List */
.use-cases-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.use-cases-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
}

.use-cases-list li i {
    color: #10b981;
    width: 16px;
}

/* Order Status Badges */
.status-badge.status-paid {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.status-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-badge.status-failed {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.section-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Section Content */
.section-content {
    padding-left: 64px;
}

/* Topic Box */
.topic-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.topic-box .topic-label {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.topic-box .topic-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Setup Steps */
.setup-steps {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.setup-steps .step {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-steps .step a {
    color: #10b981;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Section Note */
.section-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
    margin-bottom: 0;
}

.section-note a {
    color: #60a5fa;
    text-decoration: none;
}

.section-note a:hover {
    text-decoration: underline;
}

/* Radio Group for Checkout Mode */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.radio-option input[type="radio"] {
    margin-top: 2px;
    accent-color: #3b82f6;
}

.radio-option input[type="radio"]:checked+.radio-label strong {
    color: #3b82f6;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-label strong {
    font-size: 14px;
    color: var(--text-main);
}

.radio-label small {
    font-size: 12px;
    color: var(--text-muted);
}

/* Function List for Usage Guide */
.function-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.function-item {
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.function-item code {
    font-size: 13px;
    color: #60a5fa;
    font-family: 'Monaco', 'Menlo', monospace;
}

.function-item p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 0;
}

/* Use Cases List */
.use-cases-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.use-cases-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
}

.use-cases-list li i {
    color: #10b981;
    width: 16px;
}

/* Order Status Badges */
.status-badge.status-paid {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.status-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-badge.status-failed {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge.status-refunded {
    background-color: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.settings-container.compact {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
}

.settings-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 12px 12px 0 0;
    flex-wrap: wrap;
}

.settings-tab {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.settings-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.settings-tab.active {
    background: var(--accent-blue);
    color: white;
}

.message-box {
    padding: 10px 14px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 13px;
}

.message-box.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.message-box.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.message-box.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Toned down Stripe Dashboard link */
.section-title a,
.section-content a {
    color: #94a3b8;
    text-decoration: underline;
}

.section-title a:hover,
.section-content a:hover {
    color: #cbd5e1;
}

/* Email Setup Guide Styles */
.guide-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.guide-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-section h4 i {
    color: var(--accent-blue);
    font-size: 14px;
}

.guide-section ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.guide-section ol li {
    margin-bottom: 4px;
}

.guide-section code {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.code-example {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
}

.code-header {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-example pre {
    margin: 0;
    padding: 12px;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #e2e8f0;
    white-space: pre-wrap;
    line-height: 1.6;
}

.variable-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.variable-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.variable-table td {
    padding: 8px 0;
}

.variable-table td:first-child {
    width: 140px;
}

.variable-table td:last-child {
    color: var(--text-muted);
}

/* =========================================
   MOBILE RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 992px) {

    /* Adjust grid for tablets/smaller laptops */
    .detail-grid-4col {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        height: auto;
        overflow-y: visible;
    }

    .detail-section {
        height: auto;
        overflow-y: visible;
    }

    .profile-card,
    .customer-form-section,
    .notes-section-col,
    .timeline-section-col {
        height: 500px;
        /* Fixed height for grid items on tablet */
    }
}

@media (max-width: 768px) {

    /* Global Layout Adjustments */
    body {
        padding-bottom: 60px;
        /* Space for scrolling */
    }

    /* Navbar */
    .top-navbar {
        height: auto;
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }

    .nav-left,
    .nav-right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-right {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .brand {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .nav-link {
        width: 100%;
        padding: 10px 12px;
        justify-content: flex-start;
    }

    /* Search Box */
    .search-box {
        width: 100%;
        margin-right: 0;
    }

    .search-box input {
        width: 100%;
    }

    .search-box input:focus {
        width: 100%;
    }

    /* Filter Group */
    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    /* Main Content */
    .main-content {
        padding: 0;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        max-height: none;
        /* Let it grow */
    }

    table {
        min-width: 600px;
        /* Force scroll on small screens */
    }

    /* Detail Grids - Stack Everything */
    .detail-grid,
    .detail-grid-4col {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 20px;
        padding: 16px;
    }

    .detail-section {
        height: auto;
        margin-top: 0;
        overflow: visible;
    }

    /* Columns/Cards */
    .profile-card,
    .customer-form-section,
    .notes-section-col,
    .timeline-section-col,
    .edit-form {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }

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

    .profile-info {
        text-align: left;
    }

    .profile-img-lg {
        margin: 0 auto 20px auto;
    }

    /* Forms */
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .form-group,
    .form-group-xs,
    .form-group-sm,
    .form-group-md,
    .form-group-lg,
    .form-group-full {
        width: 100%;
        max-width: none;
        flex: none;
    }

    /* Settings Page */
    .settings-page {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

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

    .info-box {
        flex-direction: column;
    }

    .settings-tab-content {
        padding: 16px;
    }

    /* Login Page */
    .login-container {
        width: 90%;
        padding: 24px;
    }
}