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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.navbar {
    background: #0078d4;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 18px;
    font-weight: 600;
}

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

.nav-user {
    font-size: 14px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover {
    text-decoration: underline;
}

.container {
    max-width: 960px;
    margin: 32px auto;
    padding: 0 16px;
}

h1 {
    margin-bottom: 24px;
    font-size: 24px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #0078d4;
    color: #fff;
}

.btn-primary:hover {
    background: #106ebe;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Login page */
.login-card, .error-card {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-card h1, .error-card h1 {
    margin-bottom: 16px;
}

.login-card p, .error-card p {
    margin-bottom: 24px;
    color: #666;
}

/* Search */
.search-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.search-wrapper {
    position: relative;
    flex: 1;
}

#people-search {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#people-search:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

/* Dropdown */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

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

.suggestion-item:hover {
    background: #f0f6ff;
}

/* Email results table */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

thead {
    background: #f8f8f8;
}

th, td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

th {
    font-weight: 600;
    color: #555;
}

tr:hover {
    background: #fafafa;
}

td:last-child {
    color: #888;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error {
    color: #d32f2f;
    padding: 16px;
    background: #fff3f3;
    border-radius: 4px;
}

/* Download button */
.btn-download {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #107c10;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-download:hover {
    background: #0b6a0b;
}

.btn-download:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Spinner for download button */
.btn-download .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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