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

:root {
    /* Theme Colors (overridden by theme configuration) */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --secondary-hover: #a78bfa;
    --accent: #ec4899;

    /* Gradients */
    --gradient: linear-gradient(92deg, #6366f1 3.63%, #8b5cf6 47.68%, #ec4899 98.18%);
    --gradient-hover: linear-gradient(92deg, #818cf8 3.63%, #a78bfa 47.68%, #ec4899 98.18%);
    --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));

    /* Dark backgrounds */
    --bg-color: #13161B;
    --bg-secondary: #1a1d24;
    --card-bg: #1e2229;
    --card-bg-elevated: #252a33;

    /* Text colors for dark theme */
    --text-color: #ffffff;
    --text-secondary: #a8adb8;
    --text-muted: #6b7280;

    /* Borders */
    --border-color: #2d333b;
    --border-light: #383f4a;
    --border-glow: rgba(99, 102, 241, 0.5);

    /* Accents */
    --accent-primary: rgba(99, 102, 241, 0.2);
    --success-color: #10b981;
    --accent-color: #8b5cf6;

    /* Glow effects */
    --glow-primary: 0 0 25px rgba(99, 102, 241, 0.4);
    --glow-secondary: 0 0 25px rgba(139, 92, 246, 0.3);

    /* Background gradient overlay */
    --bg-gradient-overlay: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                           radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weka-logo-header {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 26px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.logo .brand {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--secondary);
}

#analytics-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#analytics-link svg {
    width: 18px;
    height: 18px;
}

main {
    flex: 1;
}

.section {
    animation: fadeIn 0.3s ease;
}

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

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 5;
}

.login-card, .loading-card {
    max-width: 420px;
    margin: 40px auto;
    text-align: center;
}

.weka-logo-card {
    height: 50px;
    width: auto;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.login-card h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 15px;
}

.loading-card p {
    color: var(--text-secondary);
    margin-top: 20px;
    font-size: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Slack Login Button */
.btn-slack {
    background: #4A154B;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(74, 21, 75, 0.3);
}

.btn-slack:hover {
    background: #611f69;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 21, 75, 0.4);
}

.btn-slack .slack-icon {
    width: 20px;
    height: 20px;
}

.login-card .form-group {
    text-align: left;
}

/* User List for Login */
#login-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-secondary);
    color: var(--text-color);
}

#login-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--glow-purple);
}

#login-search::placeholder {
    color: var(--text-muted);
}

.user-list-container {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg-elevated);
    position: relative;
    z-index: 10;
}

.user-list-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s;
}

.user-list-item:last-child {
    border-bottom: none;
}

.user-list-item:hover {
    background: var(--bg-secondary);
}

.user-list-item.selected {
    background: var(--gradient);
    color: white;
}

.user-list-item.selected .username {
    color: rgba(255, 255, 255, 0.8);
}

.user-list-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-list-item .avatar-placeholder {
    width: 36px;
    height: 36px;
    background: var(--border-color);
    border-radius: 50%;
}

.user-list-item .name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.user-list-item.selected .name {
    color: white;
}

.user-list-item .username {
    color: var(--text-muted);
    font-size: 13px;
}

/* Buttons with gradient */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    width: 100%;
    box-shadow: var(--glow-purple);
}

.btn-primary:hover:not(:disabled) {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(124, 3, 236, 0.6);
}

.btn-primary:disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-light);
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 9px;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-secondary:hover {
    border-color: transparent;
}

.btn-secondary:hover::before {
    opacity: 1;
}

.btn-gift {
    background: var(--accent-color);
    color: white;
    width: 100%;
    margin-top: 16px;
}

.btn-gift:hover:not(:disabled) {
    background: #d97706;
}

.btn-gift:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats Panel */
.stats-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.user-info-header .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: var(--glow-purple);
}

.user-info-header span {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.stats-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-box {
    text-align: center;
    padding: 14px 10px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-box:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-purple);
}

.stat-box .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.stat-box .stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-received .stat-number {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-remaining .stat-number {
    color: var(--secondary);
}

/* Clickable stat box styling */
.stat-clickable {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.stat-clickable:hover::before {
    left: 100%;
}

.stat-clickable:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(var(--primary-rgb, 138, 43, 226), 0.4);
    transform: translateY(-2px);
}

.stat-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-light);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    opacity: 1;
    transition: opacity 0.2s;
}

.stat-clickable:hover .stat-action {
    opacity: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

.gift-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.stat-gifts .stat-number {
    color: var(--accent);
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

/* Form Card with Logo Watermark */
.form-card-with-logo {
    position: relative;
    overflow: hidden;
}

.card-logo-watermark {
    position: absolute;
    bottom: -20px;
    right: -20px;
    opacity: 0.06;
    pointer-events: none;
}

.card-logo-watermark img {
    height: 180px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Direct Reports Inline (inside form) */
.direct-reports-inline {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}

.direct-reports-inline .quick-select-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.direct-reports-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.direct-report-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.direct-report-item:hover {
    background: var(--card-bg-elevated);
    border-color: var(--primary);
    box-shadow: var(--glow-purple);
}

.direct-reports-error {
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.direct-reports-error p {
    margin: 0.5rem 0;
}

.direct-reports-error .error-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.direct-reports-error .debug-button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.direct-reports-error .debug-button:hover {
    opacity: 0.9;
}

.direct-report-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.direct-report-item .avatar-placeholder {
    width: 24px;
    height: 24px;
    background: var(--border-color);
    border-radius: 50%;
}

.direct-report-item .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.loading-indicator {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-indicator::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.form-group {
    margin-bottom: 24px;
    position: relative;
}

/* Ensure recipient dropdown appears above other form groups */
.form-group:has(.search-select) {
    z-index: 100;
}

.form-group:has(.hashtag-buttons) {
    z-index: 1;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 14px;
}

/* Form label with action button layout */
.form-label-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-label-with-action label {
    margin-bottom: 0;
}

/* Playbook link - enhances existing toolbar-btn */
.playbook-link:hover {
    border: 1px solid var(--primary);
    background: var(--gradient-subtle);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-secondary);
    color: var(--text-color);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--glow-purple);
}

textarea::placeholder {
    color: var(--text-muted);
}

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

.help-icon {
    font-size: 14px;
    cursor: help;
    opacity: 0.7;
}

/* Message Container with Slack-style Toolbar */
.message-container {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.message-container:focus-within {
    border-color: var(--primary);
    box-shadow: var(--glow-purple);
}

/* Live Markdown Editor */
.markdown-editor {
    border: none;
    border-radius: 8px 8px 0 0;
    background: transparent;
    padding: 12px 14px;
    margin: 0;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-color);
    font-family: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.markdown-editor:focus {
    outline: none;
}

.markdown-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    pointer-events: none;
}

/* Markdown formatting in the editor */
.markdown-editor strong {
    font-weight: 700;
    color: var(--primary-light);
}

.markdown-editor em {
    font-style: italic;
    color: var(--secondary-hover);
}

.markdown-editor code {
    background: var(--card-bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 14px;
    color: var(--primary-light);
    border: 1px solid var(--border-color);
}

.markdown-editor pre {
    background: var(--card-bg-elevated);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin: 8px 0;
}

.markdown-editor pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-color);
}

.markdown-editor del {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Raw view mode */
.markdown-editor.raw-mode strong,
.markdown-editor.raw-mode em,
.markdown-editor.raw-mode code,
.markdown-editor.raw-mode del {
    all: unset;
    color: var(--text-color);
}

/* Slack-style Toolbar */
.message-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 8px 8px;
}

.toolbar-left {
    display: flex;
    gap: 4px;
}

.toolbar-right {
    display: flex;
    align-items: center;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.toolbar-btn:hover {
    background: var(--card-bg-elevated);
    color: var(--text-color);
}

.toolbar-btn:hover svg {
    opacity: 1;
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.toolbar-btn.active {
    background: var(--gradient-subtle);
    color: var(--primary);
}

.char-count {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

/* Emoji Picker Positioning */
.emoji-picker-container {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    z-index: 1000;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Style emoji picker to match app theme and make it wider */
.emoji-picker-container emoji-picker {
    --border-radius: 12px;
    --background: var(--card-bg);
    --border-color: var(--border-color);
    --text-color: var(--text-color);
    --secondary-text-color: var(--text-muted);
    --category-emoji-size: 1.125rem;
    --emoji-size: 1.5rem;
    --input-border-color: var(--border-color);
    --input-border-radius: 8px;
    --input-padding: 8px;
    --outline-color: var(--primary);
    --num-columns: 10;
    --emoji-padding: 0.5rem;
    --category-emoji-padding: 0.5rem;
    width: 450px;
    height: 400px;
}

/* GIF Picker */
.gif-picker-container {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    z-index: 1000;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 450px;
    height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gif-picker-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.gif-picker-header input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gif-picker-header input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.gif-picker-header input::placeholder {
    color: var(--text-muted);
}

.gif-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: max-content;
    gap: 8px;
    padding: 8px;
    overflow-y: scroll;
    overflow-x: hidden;
    align-content: start;
    scroll-behavior: smooth;
    height: 100%;
}

/* Enhanced scrollbar styling for GIF picker */
.gif-picker-grid::-webkit-scrollbar {
    width: 12px;
}

.gif-picker-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
}

.gif-picker-grid::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 6px;
    min-height: 40px;
}

.gif-picker-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.gif-item {
    aspect-ratio: 1;
    min-height: 150px;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-secondary);
}

.gif-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
    z-index: 1;
}

.gif-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}


/* Searchable Select */

.search-select input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-secondary);
    color: var(--text-color);
}

.search-select input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--glow-purple);
}

.search-select input::placeholder {
    color: var(--text-muted);
}

.search-select .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg-elevated);
    border: 1px solid var(--primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), var(--glow-purple);
}

/* Ensure search-select container has proper stacking */
.search-select {
    position: relative;
    z-index: 100;
}

.search-select .dropdown.open {
    display: block;
}

.search-select .dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-select .dropdown-item:hover,
.search-select .dropdown-item.highlighted {
    background: var(--bg-secondary);
}

.search-select .dropdown-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.search-select .dropdown-item .name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.search-select .dropdown-item .username {
    color: var(--text-muted);
    font-size: 13px;
}

.search-select .no-results {
    padding: 12px 14px;
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
}

.search-select .selected-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--gradient-subtle);
    border: 1px solid var(--primary);
    border-radius: 8px;
    margin-top: 8px;
}

.search-select .selected-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.search-select .selected-user .name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.search-select .selected-user .clear {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.search-select .selected-user .clear:hover {
    color: var(--secondary);
}

/* Hashtag buttons with gradient borders */
.hashtag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hashtag-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.hashtag-btn:hover {
    border-color: var(--primary-light);
    color: var(--secondary);
    box-shadow: 0 0 15px rgba(124, 3, 236, 0.2);
}

.hashtag-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--glow-purple);
}

/* Core value hashtags - emphasized styling */
.hashtag-core {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--primary);
    background: var(--gradient-subtle);
    color: var(--primary-light);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.hashtag-core:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.hashtag-core.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--glow-primary);
    transform: translateY(-1px);
}

.no-kudos-warning {
    margin-top: 12px;
    padding: 12px;
    background: rgba(124, 3, 236, 0.15);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--secondary);
    text-align: center;
    font-size: 14px;
}

.success-message {
    text-align: center;
    padding: 48px 20px;
}

.success-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.success-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    box-shadow: var(--glow-magenta);
}

.success-message h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 32px;
}

.footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: 8px;
    opacity: 0.4;
    filter: brightness(0) invert(1);
}

/* Background Avatars with purple glow overlay */
.background-avatars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.background-avatars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient-overlay);
    pointer-events: none;
}

.bg-avatar {
    position: absolute;
    border-radius: 50%;
    animation: float 30s ease-in-out infinite;
    opacity: 0.4;
}

.bg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(30%);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    33% {
        transform: translateY(-12px) scale(1.02);
    }
    66% {
        transform: translateY(8px) scale(0.98);
    }
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .logo {
        flex-direction: column;
        gap: 8px;
    }

    .logo-text {
        align-items: center;
    }

    .card {
        padding: 24px;
    }

    .hashtag-buttons {
        justify-content: center;
    }

    .stats-boxes {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 12px 16px;
    }

    .stat-box .stat-number {
        font-size: 22px;
        order: 2;
    }

    .stat-box .stat-label {
        order: 1;
    }

    .stat-action {
        font-size: 10px;
        flex-wrap: wrap;
    }

    .direct-reports-grid {
        justify-content: center;
    }

    .card-logo-watermark img {
        height: 120px;
    }
}

/* Rewards Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: rgba(255, 255, 255, 1);
}

.modal-content h2 {
    margin: 0 0 24px 0;
    color: var(--primary);
    font-size: 28px;
}

.rewards-balance {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
}

.rewards-balance p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.8);
}

.rewards-balance strong {
    color: var(--primary);
    font-size: 18px;
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.provider-card {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.provider-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.provider-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.provider-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.provider-card.disabled:hover {
    transform: none;
    border-color: transparent;
}

.provider-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.provider-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.provider-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.voucher-select {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.claim-history {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.claim-history h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
}

.claim-history-item {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.claim-info {
    flex: 1;
}

.claim-provider {
    font-weight: 600;
    color: var(--primary);
    text-transform: capitalize;
}

.claim-details {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.claim-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.claim-status.completed {
    background: rgba(0, 255, 0, 0.2);
    color: #0f0;
}

.claim-status.pending {
    background: rgba(255, 165, 0, 0.2);
    color: orange;
}

.claim-status.failed {
    background: rgba(255, 0, 0, 0.2);
    color: #f00;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
}

.modal-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

/* Kudos Received List */
.kudos-received-header {
    margin-bottom: 20px;
}

.kudos-count-summary {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin: 0;
}

.kudos-count-summary strong {
    color: var(--primary);
}

.kudos-received-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.kudos-item {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.kudos-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.kudos-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kudos-from {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.kudos-from strong {
    color: var(--primary);
}

.kudos-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.kudos-message {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    line-height: 1.5;
}

.kudos-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.kudos-hashtag {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.empty-state,
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state-subtitle {
    font-size: 14px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.4);
}

.error-state button {
    margin-top: 16px;
}

/* Scrollbar styling for kudos list */
.kudos-received-list::-webkit-scrollbar {
    width: 8px;
}

.kudos-received-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.kudos-received-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.kudos-received-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Make stats clickable */
.stat-box {
    cursor: pointer;
    transition: all 0.3s;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 600px) {
    .modal-content {
        padding: 24px;
        width: 95%;
    }

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

    /* Emoji picker adjustments for mobile */
    .emoji-picker-container {
        left: 50%;
        transform: translateX(-50%);
    }

    .emoji-picker-container emoji-picker {
        width: calc(100vw - 40px);
        max-width: 350px;
        height: 350px;
        --num-columns: 8;
    }

    /* GIF picker adjustments for mobile */
    .gif-picker-container {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 40px);
        max-width: 350px;
        height: 350px;
    }

    .gif-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hide button labels on mobile */
    .toolbar-btn span {
        display: none;
    }

    .toolbar-btn {
        padding: 8px;
    }

    .message-toolbar {
        padding: 6px 8px;
    }

    .char-count {
        font-size: 11px;
    }
}

/* Claim notification styles */
.claim-notification {
    margin: 0 0 20px 0;
    padding: 15px;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.claim-notification.claim-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.claim-notification.claim-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 18px;
    font-weight: bold;
}

.notification-text {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
