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

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #95E1D3;
    --dark: #2C3E50;
    --gray: #ECF0F1;
    --light: #F8F9FA;
    --text: #2C3E50;
    --green: #2ECC71;
    --yellow: #F39C12;
    --red: #E74C3C;
}

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

h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

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

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-logo {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tagline {
    font-size: 16px;
    font-style: italic;
    opacity: 0.9;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: #e85a5a;
    transform: translateY(-2px);
}

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

.btn-icon {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    color: var(--dark);
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--gray);
}

.btn-add {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-add:hover {
    background: #e85a5a;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    color: var(--dark);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

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

.dropdown-item.danger {
    color: var(--red);
}

.dropdown-item.danger:hover {
    background: #ffe6e6;
}

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

.btn-outline {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.compact-period-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
    max-width: 280px;
    margin: 0 auto;
}

.compact-period-selector a {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.compact-period-selector a.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-compact {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    background: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    background: #FEE;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-nav {
    display: none;
}

.nav-container {
    display: none;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

.logo:hover {
    color: #e85a5a;
    transform: scale(1.05);
}

.network-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
    max-width: 280px;
    margin: 0 auto 30px;
}

.network-tab {
    flex: 1;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.network-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* Smooth page transitions for network tabs */
.circles-container, .people-container {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--gray);
    color: var(--primary);
}

.logout-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #e85a5a;
}

.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.home-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.header-section h1 {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    margin: 0;
    flex: 1;
}

.streak-badge {
    background: rgba(138, 79, 255, 0.08);
    color: #666;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    border: 1px solid rgba(138, 79, 255, 0.15);
    white-space: nowrap;
}

.flame {
    font-size: 13px;
}

.date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 6px 10px;
    background: transparent;
    border-radius: 8px;
}

.date-nav-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    transition: all 0.2s;
}

.date-nav-btn:hover {
    background: var(--gray);
    color: #666;
}

.date-display {
    font-weight: 500;
    font-size: 13px;
    color: #888;
}

.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(138, 79, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(138, 79, 255, 0.4);
}

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

.floating-chat-btn {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.floating-chat-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.quick-recording-indicator {
    position: fixed;
    bottom: 120px;
    right: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 998;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.3s;
}

.quick-recording-indicator.active {
    opacity: 1;
    transform: scale(1);
}

.quick-recording-indicator p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.recording-pulse {
    width: 12px;
    height: 12px;
    background: var(--red);
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

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

.chat-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chat-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.floating-chat-panel {
    position: fixed;
    bottom: 70px;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 500px;
    max-height: 70vh;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.floating-chat-panel.open {
    transform: translateY(0);
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: white;
}

.chat-panel-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--dark);
}

.close-chat-btn {
    background: #f3f4f6;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-chat-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #f7f7f8;
}

.chat-message {
    padding: 16px 20px;
    word-wrap: break-word;
    animation: slideIn 0.3s ease;
    width: 100%;
}

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

.user-message {
    background: white;
    display: flex;
    justify-content: flex-end;
}

.user-message .message-content {
    background: #f4f4f4;
    color: #1f1f1f;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid #e5e5e5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.system-message {
    background: #f7f7f8;
    display: flex;
    justify-content: flex-start;
}

.system-message .message-content {
    background: white;
    color: #1f1f1f;
    padding: 14px 18px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.7;
    border: 1px solid #e5e5e5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.system-message strong {
    font-weight: 600;
    color: #0d0d0d;
}

.system-message em {
    font-style: italic;
    color: #2d3748;
}

.system-message ul {
    margin: 10px 0;
    padding-left: 24px;
}

.system-message li {
    margin: 6px 0;
    line-height: 1.6;
}

.system-message br {
    line-height: 1.8;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e5e5e5;
    background: white;
    align-items: flex-end;
}

.chat-input-container textarea {
    flex: 1;
    resize: none;
    max-height: 200px;
    min-height: 52px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    color: #1f1f1f;
    background: white;
    transition: all 0.2s;
    line-height: 1.5;
    box-shadow: 0 0 0 0 rgba(138, 79, 255, 0);
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: #8a4fff;
    box-shadow: 0 0 0 3px rgba(138, 79, 255, 0.1);
}

.chat-input-container textarea::placeholder {
    color: #9ca3af;
}

.chat-input-container .btn-primary {
    background: #8a4fff;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-input-container .btn-primary:hover {
    background: #7c3ef0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(138, 79, 255, 0.3);
}

.chat-input-container .btn-primary:active {
    transform: translateY(0);
}

.mic-btn {
    background: #f3f4f6;
    border: none;
    padding: 12px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .floating-chat-panel {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .chat-panel-header {
        padding: 16px;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .chat-panel-header h3 {
        font-size: 18px;
    }
    
    .chat-box {
        padding: 0;
    }
    
    .chat-message {
        padding: 12px 16px;
    }
    
    .user-message .message-content,
    .system-message .message-content {
        max-width: 90%;
        font-size: 15px;
    }
    
    .chat-input-container {
        padding: 12px 16px;
        gap: 6px;
    }
    
    .chat-input-container textarea {
        min-height: 44px;
        font-size: 16px;
        padding: 12px 14px;
    }
    
    .chat-input-container .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .mic-btn {
        padding: 12px 14px;
        font-size: 18px;
    }
    
    .floating-chat-btn {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
}

.kpi-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.kpi-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.kpi-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
}

.kpi-label {
    color: var(--text);
    opacity: 0.7;
    font-size: 13px;
}

.kpi-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    display: block;
}

.kpi-card-link:hover {
    transform: translateY(-5px);
}

.kpi-card-link:hover .kpi-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.section-card h2 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

/* Swipe-to-delete containers */
.digest-item-wrapper,
.consider-item-wrapper,
.following-item-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.digest-item,
.consider-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.swipe-delete-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.swipe-delete-btn:active {
    opacity: 0.8;
}

.digest-item.swipeable,
.consider-item.swipeable,
.following-item.swipeable {
    position: relative;
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    touch-action: pan-y;
}

.following-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.digest-item:last-child,
.consider-item:last-child,
.following-item:last-child {
    border-bottom: none;
}

.digest-item strong,
.consider-item strong,
.following-item strong {
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.digest-item p,
.consider-item p,
.following-item p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.digest-content,
.consider-item > div:first-child,
.following-item > div:first-child {
    flex: 1;
    min-width: 0;
}

.digest-item .btn,
.consider-item .btn,
.following-item .btn {
    padding: 6px 12px;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.person-card {
    background: white;
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.person-card h3 {
    font-size: 17px;
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #2d3748;
}

.person-card p {
    margin: 5px 0;
    font-size: 14px;
    color: #4a5568;
}

.person-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.18);
    border-color: var(--primary);
}

@media (max-width: 1024px) {
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .person-card {
        padding: 14px 12px;
    }
    
    .person-card h3 {
        font-size: 15px;
    }
    
    .person-card p {
        font-size: 13px;
    }
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-green {
    background: var(--green);
}

.status-yellow {
    background: var(--yellow);
}

.status-red {
    background: var(--red);
}

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

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

table th {
    background: var(--gray);
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .nav-links {
        overflow-x: auto;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .kpi-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .kpi-card {
        padding: 12px 8px;
    }
    
    .kpi-icon {
        font-size: 20px;
        margin-bottom: 3px;
    }
    
    .kpi-value {
        font-size: 20px;
    }
    
    .kpi-label {
        font-size: 11px;
    }
}

.tag-chip {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tag-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.tag-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.tag-item {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.tag-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tag-name {
    font-weight: 500;
    font-size: 14px;
}

.tag-count {
    background: #667eea;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

.section-title-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    margin-bottom: 20px;
}

.section-title-with-info h2 {
    margin-bottom: 0;
}

.info-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.info-btn:hover {
    background: rgba(138, 79, 255, 0.1);
    color: var(--primary);
}

.info-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: white;
    border: 2px solid var(--gray);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    display: none;
    text-align: left;
}

.info-tooltip.active {
    display: block;
}

.info-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--gray);
}

.kpi-card-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.info-wrapper {
    position: relative;
    display: inline-flex;
}

@media (max-width: 768px) {
    .info-tooltip {
        max-width: 280px;
        min-width: 200px;
    }
}

/* Onboarding Modal Styles */
.onboarding-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.onboarding-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.onboarding-content {
    min-height: 400px;
    margin-bottom: 30px;
}

.onboarding-step {
    display: none;
    text-align: center;
}

.onboarding-step h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 28px;
}

.onboarding-step p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
}

.onboarding-step ul {
    list-style: none;
    padding: 0;
}

.onboarding-step ul li {
    padding: 8px 0;
    color: #555;
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.onboarding-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s;
}

.onboarding-dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

.onboarding-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Clickable person names in Consider section */
.consider-item a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.consider-item a:hover {
    text-decoration: underline;
    color: var(--primary);
}

/* Clickable person names in circle tables */
table tbody td a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    padding: 8px 0;
}

table tbody td a:hover {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .onboarding-modal {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .onboarding-step h2 {
        font-size: 24px;
    }
    
    .onboarding-step p {
        font-size: 14px;
    }
    
    .onboarding-content {
        min-height: 350px;
    }
    
    .btn-outline, .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===== TODAY SUGGESTIONS STYLES ===== */
.home-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

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

.streak-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FF6B6B 0%, #ff8e53 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.streak-badge .flame {
    font-size: 16px;
}

.health-summary {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.health-summary p {
    margin: 0;
    color: #2e7d32;
    font-size: 14px;
}

.today-section {
    margin-bottom: 24px;
}

.today-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 16px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.suggestion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.suggestion-content {
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.person-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.relationship-label {
    font-size: 12px;
    color: #888;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 10px;
}

.suggestion-reason {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.suggestion-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.suggestion-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.skip-btn {
    opacity: 0.7;
}

.skip-btn:hover {
    opacity: 1;
}

.load-more-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
}

.empty-state-centered {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state-centered p {
    margin-bottom: 16px;
}

/* Promises in home */
.promises-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.promise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    gap: 12px;
}

.promise-content {
    flex: 1;
}

.promise-content strong {
    font-size: 14px;
    color: #333;
}

.promise-content p {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
}

.promise-content small {
    font-size: 12px;
    color: #888;
}

.see-all-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: var(--primary);
    font-size: 14px;
    text-decoration: none;
}

.see-all-link:hover {
    text-decoration: underline;
}

/* Floating chat button and panel */
.floating-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-chat-btn.hidden {
    display: none;
}

.chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.floating-chat-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.floating-chat-panel.open {
    transform: translateY(0);
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.chat-panel-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-chat-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
}

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 40vh;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.system-message {
    align-self: flex-start;
    background: #f5f5f5;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.chat-input-container textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    font-family: inherit;
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.mic-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.mic-btn:hover {
    background: #f5f5f5;
}

.mic-btn.recording {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    animation: pulse 1s infinite;
}

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

.quick-recording-indicator {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 1003;
}

.quick-recording-indicator.active {
    display: flex;
}

.recording-pulse {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

/* Desktop adjustments for chat panel */
@media (min-width: 768px) {
    .floating-chat-panel {
        left: auto;
        right: 24px;
        bottom: 100px;
        width: 400px;
        max-height: 500px;
        border-radius: 20px;
        transform: translateY(20px);
        opacity: 0;
        visibility: hidden;
    }
    
    .floating-chat-panel.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .chat-backdrop.open {
        background: transparent;
    }
}

/* FAB (Floating Action Button) */
.fab-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
}

.floating-add-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #FF8E8E 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
}

.floating-add-btn span {
    transition: transform 0.3s;
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.fab-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border: none;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.fab-option:hover {
    background: #f5f5f5;
    transform: translateX(-4px);
}

.fab-icon {
    font-size: 18px;
}

.fab-label {
    font-size: 14px;
    color: #333;
}

/* Quick Modals */
.quick-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.quick-modal.open {
    opacity: 1;
    visibility: visible;
}

.quick-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.quick-modal.open .quick-modal-content {
    transform: translateY(0);
}

.quick-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.quick-modal-header h3 {
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #333;
}

.btn-block {
    width: 100%;
}

/* Notification Badge */
.nav-notification {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Person Chat Button */
.person-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.person-chat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Compact Today Section */
.today-section {
    padding: 16px;
}

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

.today-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.refresh-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 16px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.refresh-btn.loading {
    animation: spin 1s linear infinite;
}

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

.suggestions-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.circle-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    padding: 0 4px;
    margin-bottom: 2px;
}

.person-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    overflow: hidden;
}

.person-chip:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.chip-main {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.chip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.chip-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chip-name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip-reason {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
    color: #6b7280;
}

.action-btn:hover {
    background: #e5e7eb;
}

.action-btn.skip-btn {
    font-size: 14px;
    color: #9ca3af;
}

.action-btn.skip-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.load-more-link {
    display: block;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    margin-top: 8px;
}

.load-more-link:hover {
    text-decoration: underline;
}

.empty-today {
    text-align: center;
    padding: 24px 16px;
    color: #6b7280;
}

.empty-today p {
    font-size: 14px;
    margin-bottom: 12px;
}

/* Health Summary Styling */
.health-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 3px solid #667eea;
}

.health-summary p {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    text-decoration: none;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    border-radius: 8px;
}

.nav-tab svg {
    stroke-width: 1.5;
}

.nav-tab span {
    line-height: 1;
}

.nav-tab:hover {
    color: #6b7280;
}

.nav-tab.active {
    color: #667eea;
}

.nav-tab.active svg {
    stroke-width: 2;
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 600;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Adjust main content for bottom nav */
.main-content {
    padding-bottom: 80px;
}

/* Consistent Placeholder Styling */
::placeholder {
    color: #9ca3af;
    font-style: normal;
    font-weight: 400;
    opacity: 1;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
    color: #9ca3af;
    font-family: inherit;
    font-size: inherit;
    font-weight: 400;
}

/* Person Detail Page - Clean Design */
.person-detail-container {
    max-width: 600px;
    margin: 0 auto;
}

.person-header {
    padding: 20px;
}

.person-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.person-name-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.person-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
}

.person-nickname {
    font-size: 15px;
    color: #888;
    font-weight: 400;
}

.edit-nickname-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    transition: color 0.2s;
}

.edit-nickname-btn:hover {
    color: #667eea;
}

.btn-icon-menu {
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.btn-icon-menu:hover {
    background: var(--gray);
    color: var(--dark);
}

.nickname-edit-form {
    display: none;
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.nickname-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    max-width: 200px;
}

.person-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.meta-tag {
    font-size: 13px;
    color: #666;
}

.meta-tag.editable {
    color: #667eea;
    cursor: pointer;
    border-bottom: 1px dashed #667eea;
    transition: color 0.2s;
}

.meta-tag.editable:hover {
    color: #5a6fd6;
}

.meta-separator {
    color: #ccc;
    font-size: 12px;
}

.person-notes {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* About Section - Compact Modern Design */
.about-section {
    padding: 12px 14px;
    background: #fafbfc;
    border-radius: 10px;
    margin: 0;
}

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

.about-title {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.edit-about-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.7;
}

.edit-about-btn:hover {
    opacity: 1;
    color: #667eea;
}

.about-content {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.about-content p {
    margin: 0;
}

.about-text {
    white-space: pre-line;
    margin: 0;
}

.about-content ul {
    margin: 0;
    padding-left: 16px;
}

.about-content li {
    margin-bottom: 2px;
}

.about-placeholder {
    color: #bbb;
    font-size: 12px;
    font-style: italic;
    cursor: pointer;
    padding: 4px 0;
}

.about-placeholder:hover {
    color: #667eea;
}

.about-edit-form {
    display: none;
}

.about-edit-form.active {
    display: block;
}

.about-edit-form textarea {
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    resize: vertical;
    background: white;
}

.about-edit-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.about-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.about-edit-actions .btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.about-edit-actions .btn-link:hover {
    background: rgba(102, 126, 234, 0.1);
}

.about-edit-actions .btn-link.cancel {
    color: #888;
}

.about-edit-actions .btn-link.cancel:hover {
    background: #f0f0f0;
}

.about-enriched-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    color: #4ECDC4;
    background: rgba(78, 205, 196, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    font-weight: 500;
}

.person-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.action-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.action-btn-secondary:hover {
    background: #f8f9ff;
}

.action-icon {
    font-size: 16px;
}

/* Modern Greeting Bar */
.greeting-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 20px;
}

.greeting-text {
    font-size: 14px;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.2px;
}

.greeting-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn-mini {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn-mini:hover {
    background: #f5f5f5;
    color: var(--dark);
}

.icon-btn-mini.loading {
    animation: spin 1s linear infinite;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    padding: 0 2px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    letter-spacing: -0.3px;
}

.section-count {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

/* Streak Pill */
.streak-pill {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #e5e5e5;
}

.icon-btn.loading {
    animation: spin 1s linear infinite;
}

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

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.contact-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
    min-width: 0;
}

.contact-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.contact-top .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}

.contact-top .time-ago {
    font-size: 12px;
    color: #999;
}

.why-tag {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    max-width: 100%;
}

.tag-birthday {
    background: #ffe6f0;
    color: #d63384;
}

.tag-promise {
    background: #fff3e0;
    color: #e65100;
}

.tag-overdue {
    background: #ffebee;
    color: #c62828;
}

.tag-checkin {
    background: #e8f5e9;
    color: #2e7d32;
}

.row-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.log-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.log-btn:hover {
    transform: scale(1.05);
}

.skip-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skip-btn:hover {
    background: #f5f5f5;
    color: #999;
}

.more-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.more-btn:hover {
    background: #eee;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark);
}

.empty-state p {
    color: #888;
    margin-bottom: 20px;
    font-size: 14px;
}

.promises-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.promises-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark);
}

.promise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.promise-row:last-child {
    border-bottom: none;
}

.promise-text {
    font-size: 13px;
    color: #555;
    flex: 1;
}

.done-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    background: var(--green);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* When toggle buttons */
.when-toggle {
    display: flex;
    gap: 8px;
}

.when-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.when-btn.active {
    border-color: #667eea;
    background: #f5f7ff;
    color: #667eea;
}

.optional-label {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

.voice-input-btn {
    width: 100%;
    padding: 14px;
    border: 2px dashed #667eea;
    border-radius: 12px;
    background: #f8f9ff;
    color: #667eea;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.voice-input-btn:hover {
    background: #eff1ff;
}

.voice-input-btn.recording {
    border-color: #e74c3c;
    background: #fff5f5;
    color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.voice-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.toast-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Compact Person Detail Styles */
.info-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.info-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.info-item:hover {
    background: #fafafa;
}

.info-icon {
    font-size: 20px;
}

.info-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.info-text.muted {
    font-weight: 400;
    color: #999;
}

.info-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.info-badge.soon {
    background: #ffe6f0;
    color: #d63384;
}

.compact-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.summary-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 8px;
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-tag {
    padding: 3px 10px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
}

.mini-tag:hover {
    background: #e5e5e5;
}

.stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compact-section {
    background: white;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

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

.section-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.section-header .add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header .add-btn:hover {
    background: #e0e0e0;
}

.view-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 0;
    margin-bottom: 8px;
}

.view-header .add-btn {
    padding: 10px 16px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #FF8E8E 100%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.view-header .add-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.view-header .add-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    margin-top: 5px;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.timeline-date {
    font-size: 12px;
    color: #999;
}

.timeline-note {
    width: 100%;
    margin: 4px 0 0 18px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.promise-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promise-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fefefe;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
}

.promise-item.done {
    opacity: 0.6;
    background: #fafafa;
}

.promise-item .promise-text {
    flex: 1;
    font-size: 14px;
    color: #444;
}

.promise-due {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 8px;
}

.check-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--green);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.check-btn:hover {
    transform: scale(1.05);
}

.done-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8f5e9;
    color: var(--green);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delight-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.delight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.delight-text {
    font-size: 14px;
    color: #444;
}

.delight-date {
    font-size: 12px;
    color: #999;
}

.empty-hint {
    font-size: 13px;
    color: #aaa;
    text-align: center;
    padding: 12px 0;
    margin: 0;
}

.show-more-btn {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.show-more-btn:hover {
    background: #eee;
}
