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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    flex: 1;
}

.header h1 {
    color: #333;
    font-size: 3em;
    margin-bottom: 10px;
}

.header .subtitle {
    color: #666;
    font-size: 1.3em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: #667eea;
    font-weight: bold;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Section */
.section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    font-size: 1.8em;
}

/* System Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-detail {
    font-size: 0.85em;
    opacity: 0.8;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.3s;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.service-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    color: white;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.service-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.service-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 8px;
}

.service-desc {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.service-url {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    display: inline-block;
}

.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

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

/* Quick Actions */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.action-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.action-icon {
    font-size: 2em;
}

/* Container Controls */
.container-list {
    margin-top: 20px;
}

.container-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e2e8f0;
}

.container-info {
    flex: 1;
}

.container-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.container-status {
    font-size: 0.9em;
    color: #64748b;
}

.container-status.running {
    color: #10b981;
}

.container-status.stopped {
    color: #ef4444;
}

.container-stats-detail {
    font-size: 0.85em;
    color: #667eea;
    margin-top: 3px;
}

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

.btn-small {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-start {
    background: #10b981;
    color: white;
}

.btn-stop {
    background: #ef4444;
    color: white;
}

.btn-restart {
    background: #667eea;
    color: white;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Logs */
.logs-container {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
    margin-top: 20px;
}

.log-entry {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.log-title {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 5px;
}

.log-line {
    margin-left: 10px;
    color: #94a3b8;
}

/* Notes Section */
.notes-editor {
    margin-top: 20px;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-save {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

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

/* IP Info */
.ip-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    margin-top: 20px;
}

.ip-card {
    text-align: center;
}

.ip-label {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.ip-value {
    color: #333;
    font-size: 1.5em;
    font-weight: bold;
    font-family: monospace;
}

/* Loading & Alerts */
.loading {
    text-align: center;
    color: #667eea;
    font-style: italic;
    padding: 20px;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #f59e0b;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

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

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

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

a {
    color: inherit;
    text-decoration: none;
}


/* Rivera Analytics Tabs */
.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary-blue);
}

.tab-btn.active {
    color: var(--primary-blue);
    border-bottom-color: var(--accent-orange);
}

.rivera-tab-content {
    padding: 20px 0;
}

/* Submission Cards */
.submission-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.submission-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.submission-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.submission-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-new {
    background: #fef3c7;
    color: #92400e;
}

.status-contacted {
    background: #dbeafe;
    color: #1e40af;
}

.status-converted {
    background: #d1fae5;
    color: #065f46;
}

.status-archived {
    background: #f3f4f6;
    color: #6b7280;
}

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

.submission-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.submission-message {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

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

.btn-status {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-contacted {
    background: #3b82f6;
    color: white;
}

.btn-converted {
    background: #10b981;
    color: white;
}

.btn-archived {
    background: #6b7280;
    color: white;
}

.btn-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Data Tables */
.data-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

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

.data-table th {
    background: var(--primary-blue);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: var(--light-gray);
}

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

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
