:root {
    --primary: #18181b;
    /* Graphicon Neutral Black */
    --primary-hover: #27272a;
    --accent: #3b82f6;
    /* Subtle accent blue */
    --bg-main: #fafafa;
    --bg-sidebar: #ffffff;
    --text-main: #09090b;
    --text-muted: #71717a;
    --border: #e4e4e7;
    --surface: #ffffff;
    --radius: 12px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 3.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav-link:hover {
    color: var(--primary);
    background-color: #f4f4f5;
}

.nav-link.active {
    background-color: #18181b;
    color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.main {
    flex: 1;
    margin-left: 280px;
    padding: 3.5rem;
    max-width: 1200px;
}

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

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

/* Components */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
    outline: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background-color: #f4f4f5;
    border-color: #d4d4d8;
}

/* Table */
.data-table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f4f4f5;
    font-size: 0.875rem;
    vertical-align: middle;
}

.qr-table-thumb {
    width: 100px;
    height: 100px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-table-thumb canvas,
.qr-table-thumb img {
    max-width: 100%;
    height: auto;
}

.data-table tr:hover td {
    background-color: #fafafa;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-blue {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-green {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-gray {
    background: #f4f4f5;
    color: #52525b;
    border: 1px solid #e4e4e7;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.modal {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.modal-lg {
    max-width: 800px;
}

.modal-row {
    display: flex;
    gap: 2rem;
}

.modal-col-fields {
    flex: 8;
}

.modal-col-preview {
    flex: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
    border-left: 1px solid var(--border);
    padding-left: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.05);
}

.qr-preview {
    width: 180px;
    height: 180px;
    margin: 1.5rem auto;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem;
}

/* Stats Cards */
.stat-card-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.text-muted {
    color: var(--text-muted);
}

/* Mobile Preview */
.phone-preview-wrapper {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    position: relative;
    margin-top: 2rem;
}

.phone-frame {
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 6px solid #18181b;
    position: relative;
    overflow: hidden;
    height: 520px;
}

.phone-screen {
    background: #fff;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for phone screen */
.phone-screen::-webkit-scrollbar {
    width: 4px;
}

.phone-screen::-webkit-scrollbar-track {
    background: transparent;
}

.phone-screen::-webkit-scrollbar-thumb {
    background: #e4e4e7;
    border-radius: 10px;
}

/* Internal Profile Preview Items */
.profile-preview-header {
    background: #18181b;
    min-height: 80px;
    width: 100%;
    position: relative;
    flex-shrink: 0;
}

.profile-preview-img-wrap {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-preview-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview-img-wrap .initials {
    font-size: 1.5rem;
    font-weight: 700;
    color: #18181b;
}

.profile-preview-content {
    padding: 45px 15px 20px;
    text-align: center;
}

.profile-preview-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.2;
}

.profile-preview-title {
    font-size: 0.75rem;
    color: #71717a;
    margin-bottom: 15px;
}

.profile-preview-links {
    text-align: left;
}

.profile-preview-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f4f5;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    word-break: break-all;
}

.profile-preview-link i {
    width: 14px;
    height: 14px;
    color: #71717a;
    flex-shrink: 0;
}

.profile-preview-button {
    background: #18181b;
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}