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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

.logo h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    color: #888;
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.85rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 82, 82, 0.2);
    border-radius: 8px;
    color: #ff5252;
    text-align: center;
    font-size: 0.9rem;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-logout {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dashboard */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.search-panel, .results-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-panel h2, .results-panel h2 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.progress-bar {
    margin-top: 20px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s;
    width: 0%;
}

.progress-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.export-controls {
    display: flex;
    gap: 10px;
}

.export-controls input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.3);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.5);
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-small {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

.contacts-list {
    max-height: 500px;
    overflow-y: auto;
}

.contact-card {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.contact-info strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
}

.contact-info .phone {
    display: inline-block;
    margin-right: 15px;
    color: #667eea;
}

.contact-info .city {
    color: #888;
    font-size: 0.85rem;
}

.placeholder {
    text-align: center;
    color: #666;
    padding: 40px;
}

.total-count {
    margin-top: 15px;
    text-align: right;
    color: #888;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}
