/* Root Variables */
:root {
    --primary-purple: #7c3aed;
    --light-purple: #a78bfa;
    --bg-color: #ffffff;
    --secondary-bg: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --nav-height: 70px;
    --shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* Container */
.container {
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Content Area */
.content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Headers */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
    border-color: var(--light-purple);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    gap: 4px;
}

.nav-item .material-icons {
    font-size: 24px;
    transition: all 0.2s ease;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--secondary-bg);
    border-radius: 8px;
}

.nav-item.active {
    color: var(--primary-purple);
}

.nav-item.active .material-icons {
    color: var(--primary-purple);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: white;
}

.btn-primary:hover {
    background-color: #6d28d9;
}

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* Input Fields */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background-color: var(--secondary-bg);
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: 600;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.list-item-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--primary-purple);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .material-icons {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (min-width: 768px) {
    .content {
        padding: 32px;
    }

    .page-title {
        font-size: 32px;
    }

    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }
}

/* Person Avatar & Status Badge */
.person-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}

.status-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-online { background: #10b981; }
.status-away { background: #f59e0b; }
.status-busy { background: #ef4444; }
.status-offline { background: #9ca3af; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Jump List for New Chat Page */
.jump-list {
    position: fixed;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 10;
}

.jump-letter {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-purple);
    text-decoration: none;
    padding: 2px 6px;
    transition: all 0.2s ease;
}

.jump-letter:hover {
    background-color: var(--light-purple);
    color: white;
    border-radius: 4px;
}

/* Hide bottom nav on new chat page */
body.hide-nav .bottom-nav {
    display: none;
}

body.hide-nav .container {
    height: 100vh;
}

