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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0e27;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

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

header {
    color: #ffffff;
    margin-bottom: 30px;
}

header > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header > div > div:last-child {
    text-align: right;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    font-weight: 300;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 12px 24px;
    background: #1a1f3a;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    color: #b0b0b0;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #252a4a;
    border-color: #3a3f5a;
    color: #ffffff;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: #151a2e;
    border: 1px solid #252a3e;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 600;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #c0c0c0;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background: #0f1428;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    font-size: 1em;
    color: #e0e0e0;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    background: #151a2e;
}

input::placeholder,
textarea::placeholder {
    color: #6b7280;
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: #4b5563;
    color: white;
}

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

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Results */
.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.result.success {
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #059669;
    display: block;
}

.result.error {
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid #dc2626;
    display: block;
}

.result.info {
    background: #1e3a8a;
    color: #93c5fd;
    border: 1px solid #2563eb;
    display: block;
}

.result.loading {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    display: block;
}

/* Opportunities List */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input[type="number"] {
    padding: 10px;
    background: #0f1428;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    font-size: 1em;
    color: #e0e0e0;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c0c0c0;
    font-weight: 400;
    margin: 0;
    margin-left: 10px;
}

.btn-spacing {
    margin-left: 10px;
}

.btn-top-spacing {
    margin-top: 20px;
}

.login-container header {
    text-align: center;
    margin-bottom: 30px;
}

.login-container h3 {
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
}

.login-container h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #c0c0c0;
    font-weight: 500;
}

.filters input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.opportunities-list {
    display: grid;
    gap: 15px;
}

.opportunity-item {
    background: #1a1f3a;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.opportunity-item:hover {
    border-color: #3a3f5a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.opportunity-item.transferred {
    background: #2a1f1a;
    border-color: #4a3f2a;
    opacity: 0.9;
}

.opportunity-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.opportunity-badge.transferred {
    background: #78350f;
    color: #fbbf24;
}

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

.opportunity-id {
    font-size: 1.2em;
    font-weight: 600;
    color: #60a5fa;
}

.opportunity-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-open {
    background: #064e3b;
    color: #6ee7b7;
}

.status-win {
    background: #1e3a8a;
    color: #93c5fd;
}

.status-lose {
    background: #7f1d1d;
    color: #fca5a5;
}

.opportunity-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.opportunity-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c0c0c0;
}

.opportunity-detail strong {
    color: #e0e0e0;
    font-weight: 500;
}

.opportunity-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Bulk Opportunities */
.bulk-opportunity {
    background: #1a1f3a;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

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

.bulk-opportunity h3 {
    color: #60a5fa;
    font-size: 1.1em;
}

.bulk-opportunity .form-row {
    grid-template-columns: 1fr 1fr;
}

/* Settings */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #1a1f3a;
    border-radius: 8px;
    border-left: 3px solid #2563eb;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
}

.settings-section h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #c0c0c0;
    font-size: 1em;
    font-weight: 500;
}

.zpro-config-item {
    background: #0f1424;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.zpro-config-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zpro-config-item .remove-config-btn {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Info */
.info {
    color: #9ca3af;
    margin-bottom: 20px;
    font-size: 0.9em;
    line-height: 1.6;
}

small {
    color: #6b7280;
    font-size: 0.85em;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #60a5fa;
}

/* User Info */
#userInfo {
    color: #9ca3af;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Login Page Styles */
.login-container {
    max-width: 500px;
    margin: 100px auto;
}

.login-container .card {
    margin-bottom: 0;
    max-width: 100%;
}

.login-container header h1 {
    color: #ffffff;
}

.login-container .subtitle {
    color: #9ca3af;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.login-tab-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #2a2f4a;
    background: #1a1f3a;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    color: #b0b0b0;
    transition: all 0.3s;
}

.login-tab-btn:hover {
    background: #252a4a;
    border-color: #3a3f5a;
    color: #ffffff;
}

.login-tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.error-message {
    background: #7f1d1d;
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #dc2626;
}

.hidden {
    display: none !important;
}

.agent-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.agent-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid #2a2f4a;
    background: #1a1f3a;
    color: #b0b0b0;
    cursor: pointer;
    font-weight: 600;
}

.agent-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.success-message {
    background: #064e3b;
    color: #6ee7b7;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #059669;
}

.info-text {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 5px;
}

/* Support Agent Styles */
.support-section {
    margin-top: 20px;
}

.support-agents-list {
    margin-top: 20px;
}

.support-agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.support-agent-card {
    background: #151a2e;
    border: 1px solid #252a3e;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.support-agent-card:hover {
    border-color: #3a3f5a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.support-agent-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.agent-info {
    margin-bottom: 15px;
}

.agent-info p {
    margin: 8px 0;
    color: #c0c0c0;
    font-size: 0.9em;
}

.agent-info strong {
    color: #ffffff;
    font-weight: 600;
}

.agent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-spacing {
    margin-left: 10px;
}

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

.config-header h4 {
    margin: 0;
    color: #ffffff;
}

.search-result-item {
    background: #0f1424;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.search-result-item h5 {
    color: #60a5fa;
    margin-bottom: 10px;
}

.search-result-item p {
    color: #c0c0c0;
    line-height: 1.6;
    margin-bottom: 8px;
}

.search-result-item small {
    color: #6b7280;
    font-size: 0.85em;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .opportunity-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1a1f3a;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #2d3748;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2d3748;
}

.modal-header h2 {
    margin: 0;
    color: #ffffff;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #ffffff;
}

.modal-body {
    padding: 20px;
}
