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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #c0c0c0;
    padding: 10px;
    color: #000;
    font-size: 12px;
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid #808080;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
}

.dashboard-header {
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    height: 40px;
    box-sizing: border-box;
}

.dashboard-header h1 {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin: 0;
    flex-shrink: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn {
    padding: 4px 12px;
    border: 1px outset #c0c0c0;
    background: #c0c0c0;
    font-size: 11px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    color: #000;
}

.btn:active {
    border: 1px inset #c0c0c0;
}

.btn-primary {
    background: #c0c0c0;
}

.btn-danger {
    background: #c0c0c0;
}

.btn-secondary {
    background: #c0c0c0;
}

.status-indicator {
    font-size: 10px;
    color: #000;
    padding: 2px 6px;
    display: inline-block;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}

.status-indicator.active {
    color: #008000;
}

.status-indicator.idle {
    color: #808080;
}

.status-indicator.loading {
    color: #ff8000;
}

.status-indicator.error {
    color: #ff0000;
}

#lastUpdate {
    font-size: 10px;
    color: #000;
    display: inline-block;
    min-width: 120px;
    text-align: left;
    flex-shrink: 0;
}

.stats-bar {
    display: table;
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-bottom: 1px solid #808080;
}

.stat-card {
    display: table-cell;
    padding: 15px;
    text-align: center;
    border-right: 1px solid #808080;
    vertical-align: middle;
}

.stat-card:last-child {
    border-right: none;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 11px;
    color: #000;
    text-transform: uppercase;
}

.controls-bar {
    padding: 10px 15px;
    background: #ffffff;
    border-bottom: 1px solid #808080;
    display: flex;
    align-items: center;
    gap: 15px;
}

.controls-bar label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #000;
    cursor: pointer;
}

.controls-bar input[type="checkbox"] {
    width: 13px;
    height: 13px;
    cursor: pointer;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 4px;
    border: 1px inset #c0c0c0;
    font-size: 11px;
    font-family: Arial, sans-serif;
    background: #ffffff;
}

.search-input:focus {
    outline: 1px dotted #000;
}

.main-content {
    display: flex;
    gap: 10px;
    padding: 10px;
    align-items: flex-start;
}

.table-section {
    flex: 1;
    min-width: 0;
}

.activity-section {
    width: 300px;
    flex-shrink: 0;
}

.domain-section {
    width: 100%;
    margin-top: 10px;
}

.domain-box {
    background: #ffffff;
    border: 2px solid #808080;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    display: flex;
    flex-direction: column;
}

.domain-header {
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 35px;
    box-sizing: border-box;
}

.domain-header h3 {
    font-size: 12px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.domain-content {
    padding: 10px;
    overflow: auto;
}

.domains-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.domains-table thead {
    background: #c0c0c0;
}

.domains-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #808080;
    background: #c0c0c0;
    color: #000;
}

.domains-table td {
    padding: 6px 10px;
    border: 1px solid #c0c0c0;
}

.domains-table tbody tr:nth-child(even) {
    background: #f0f0f0;
}

.domain-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.domain-status.active {
    background: #d4edda;
    color: #155724;
}

.domain-status.pending {
    background: #fff3cd;
    color: #856404;
}

.domain-status.error {
    background: #f8d7da;
    color: #721c24;
}

.dns-records {
    font-family: monospace;
    font-size: 10px;
    color: #666;
}

.dns-record-item {
    margin: 3px 0;
}

.copy-dns-btn {
    padding: 2px 6px;
    font-size: 9px;
    margin-left: 5px;
}

.activity-box {
    background: #ffffff;
    border: 2px solid #808080;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.activity-header {
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 35px;
    box-sizing: border-box;
}

.activity-header h3 {
    font-size: 11px;
    font-weight: bold;
    color: #000;
    margin: 0;
    line-height: 23px;
}

.activity-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #f0f0f0;
    font-size: 10px;
    font-family: 'Courier New', monospace;
}

.activity-message {
    padding: 4px 6px;
    margin-bottom: 4px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    color: #000;
    word-wrap: break-word;
    line-height: 1.4;
}

.activity-message:last-child {
    margin-bottom: 0;
}

.activity-message.new-ip {
    border-left: 3px solid #008000;
}

.activity-message.form-submit {
    border-left: 3px solid #ff8000;
    background-color: #fff4e6;
}

.activity-message.redirect {
    border-left: 3px solid #0000ff;
}

.activity-message.approve {
    border-left: 3px solid #1662dd;
    background-color: #f0f6ff;
}

.activity-message.deny {
    border-left: 3px solid #ff8000;
    background-color: #fff4e6;
}

.activity-message.timestamp {
    color: #808080;
    font-size: 9px;
    padding: 2px 6px;
    background: #e8e8e8;
    border: none;
}

.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    background: #ffffff;
    scroll-behavior: auto;
}

.connections-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.connections-table thead {
    background: #c0c0c0;
    position: sticky;
    top: 0;
}

.connections-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: bold;
    font-size: 11px;
    border: 1px solid #808080;
    background: #c0c0c0;
    color: #000;
    height: 35px;
    box-sizing: border-box;
    line-height: 23px;
}

.connections-table tbody tr {
    border-bottom: 1px solid #c0c0c0;
}

.connections-table tbody tr:nth-child(even) {
    background: #f0f0f0;
}

.connections-table tbody tr:hover {
    background: #e0e0e0;
}

.connections-table td {
    padding: 6px 10px;
    font-size: 11px;
    border-right: 1px solid #c0c0c0;
    color: #000;
    vertical-align: middle;
}

.connections-table th:nth-child(1),
.connections-table td:nth-child(1) {
    width: 15%;
}

.connections-table th:nth-child(2),
.connections-table td:nth-child(2) {
    width: 25%;
}

.connections-table th:nth-child(3),
.connections-table td:nth-child(3) {
    width: 35%;
}

.connections-table th:nth-child(4),
.connections-table td:nth-child(4) {
    width: 25%;
}

.ip-address {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #000;
}

.user-agent {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
}

.referrer {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
}

.data-cell.clickable {
    cursor: pointer;
}

.data-cell.clickable:hover {
    background: #e0e0e0;
}

.redirect-select {
    padding: 3px;
    border: 1px inset #c0c0c0;
    font-size: 11px;
    font-family: Arial, sans-serif;
    background: #ffffff;
    min-width: 150px;
}

.redirect-select:focus {
    outline: 1px dotted #000;
}

.redirect-btn {
    padding: 2px 8px;
    font-size: 11px;
}

.loading, .error, .no-data-cell {
    text-align: center;
    padding: 20px;
    color: #808080;
    font-style: italic;
}

.error {
    color: #ff0000;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #808080;
}

.no-data p {
    font-size: 12px;
    font-style: italic;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-window {
    background: #ffffff;
    border: 2px solid #808080;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    min-width: 500px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.modal-close {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    font-size: 12px;
    padding: 2px 8px;
    cursor: pointer;
    color: #000;
    font-weight: bold;
}

.modal-close:active {
    border: 1px inset #c0c0c0;
}

.modal-close:hover {
    background: #d0d0d0;
}

.modal-content {
    padding: 15px;
}

.data-field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border: 1px solid #c0c0c0;
    background: #f8f8f8;
    font-size: 11px;
}

.data-field strong {
    min-width: 120px;
    color: #000;
}

.data-value {
    flex: 1;
    margin: 0 10px;
    font-family: 'Courier New', monospace;
    color: #000;
    word-break: break-all;
}

.copy-btn {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    color: #000;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
}

.copy-btn:active {
    border: 1px inset #c0c0c0;
}

.copy-btn:hover {
    background: #d0d0d0;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-bar {
        display: block;
    }
    
    .stat-card {
        display: block;
        border-right: none;
        border-bottom: 1px solid #808080;
    }
    
    .stat-card:last-child {
        border-bottom: none;
    }
    
    .connections-table {
        font-size: 10px;
    }
    
    .connections-table th,
    .connections-table td {
        padding: 4px 6px;
    }
    
    .user-agent,
    .referrer {
        max-width: 150px;
    }
}
