* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

html {
    background-color: #0a0f1e;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0a0f1e 0%, #1a1f2f 100%);
    min-height: 100vh;
    padding: 20px 20px 0 20px;
    color: #e2e8f0;
}

.dash-container {
    display: grid;
    gap: 20px;
    max-width: 1440px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.login-container {
    display: grid;
    gap: 20px;
    max-width: 400px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.logo {
    display: inline-block;
    margin-bottom: 20px;
}

.logo svg {
    width: 120px;
    height: auto;
}

.logo-text {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text span {
    color: #0070f3;
}

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

.form-group label {
    display: block;
    color: #9aa9b9;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: #0f1a2f;
    border: 1px solid #2a3a4a;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0070f3;
}

.form-control::placeholder {
    color: #4a5a6a;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa9b9;
    cursor: pointer;
    font-size: 14px;
}

.toggle-password:hover {
    color: #fff;
}

.btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #a78bfa, #ec4899);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.info-box {
    margin-top: 20px;
    padding: 16px;
    background: #0f1a2f;
    border: 1px solid #2a3a4a;
    border-radius: 12px;
}

.info-box p {
    color: #9aa9b9;
    font-size: 14px;
    line-height: 1.5;
}

.info-box strong {
    color: #fff;
}

.footer {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 -20px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer a {
    color: #9aa9b9;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #0070f3;
}

.footer span {
    color: #4a5a6a;
    margin: 0 10px;
}

.server-info {
    margin-top: 20px;
    padding: 16px;
    background: #0f1a2f;
    border: 1px solid #2a3a4a;
    border-radius: 12px;
}

.server-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.server-info-item:last-child {
    margin-bottom: 0;
}

.server-info-label {
    color: #9aa9b9;
    font-size: 13px;
}

.server-info-value {
    color: #fff;
    font-size: 13px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 320px;
    padding: 20px;
    flex: 1;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #a78bfa;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-values {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    
}

.stat-value small {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: normal;
}

.logbar {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.log-container {
    width: 100%;
    height: 100px;
    padding-right: 20px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 12px;
}
.log-container:hover {
    border-color: #a78bfa;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.log-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

.log-line {
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
    transition: all 0.15s ease;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-line:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #cbd5e6;
}

.log-line.error {
    color: #f87171;
}

.log-line.success {
    color: #4ade80;
}

.log-line.warning {
    color: #fbbf24;
}

.log-line.info {
    color: #60a5fa;
}

.log-line .email {
    color: #a78bfa;
    font-weight: 500;
}

.log-line .ip {
    color: #f472b6;
}

.log-line .protocol {
    color: #2dd4bf;
    font-weight: 500;
}

.log-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 8px;
}

.log-badge.accepted {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.log-badge.blocked {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.log-empty {
    text-align: center;
    padding: 40px;
    color: #4b5563;
    font-style: italic;
}

.log-loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

.log-loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 0;
    margin: 0 -20px;
    padding: 20px;
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.service-buttons {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px,1fr));
    gap: 10px;
    width: 100%;
}

.service-btn {
    text-align: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    gap: 10px;
}

.service-btn:hover {
    transform: scale(1.040);
    background: linear-gradient(135deg, #5a6fe0 0%, #6a3f9a 100%);
}

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

.service-btn.updating {
    background: linear-gradient(135deg, #48c78e 0%, #3aa87a 100%);
}

.search-box {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(256px,1fr));
    gap: 10px;
    width: 100%;
}

.search-box input {
    width: 100%;
    min-width: 256px;
    min-height: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #a78bfa;
    background: rgba(255, 255, 255, 0.1);
}

.search-box input::placeholder {
    color: #64748b;
}

.filter-buttons {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.filter-btn {
    flex: 1;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #a78bfa;
}

.filter-btn.active {
    background: linear-gradient(135deg, #a78bfa, #ec4899);
    border-color: transparent;
    color: white;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 20px;
    transition: all 0.3s;
}

.card:hover {
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card.active {
    background: rgba(27, 70, 29, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.card.active select {
    color: #4caf50;
}
.card.active select:hover {
    border-color: #4caf50;
}
.card.adder {
    background: rgba(6, 64, 117, 0.3);
    border: 1px solid rgba(24, 138, 244, 0.3);
}
.card.adder select{
    color: #669ede;
}
.card.adder select:hover {
    border-color: #669ede;
}
.card.blocked {
    background: rgba(99, 28, 23, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.3);
}
.card.blocked select {
    color: #f44336;
}
.card.blocked select:hover {
    border-color: #f44336;
}

.card-header {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-details {
    display: flex;
    flex-flow: row;
    width: 100%;
    height: 48px;
    position: relative;
}

.user-details input{
    width: 100%;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0 64px 0 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    outline: none;
}

.user-details input:hover{
    border-color: rgba(255, 255, 255, 1);
}

.user-details input:focus {
    border-color: rgba(255, 255, 255, 1);
}

.user-details input::placeholder{
    font-weight: 600;
    font-size: 0.8rem;
}

.user-details input+small {
    position: absolute;
    right: 12px;
    top: 16px;
    font-weight: 600;
    font-size: 0.8rem;
}

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

.user-name {
    width: 100%;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 12px;
}

.status-info {
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.status-info select {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9aa9b9;
    border-radius: 12px;
    width: 100%;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s;
    text-align-last: center;
    outline: none!important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.status-info select:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #a78bfa;
}

.user-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 100%;
    padding: 16px 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}
.user-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #ffffff;
}

.config-nogrid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.config-uuid {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 12px;
    transition: all 0.3s;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.config-uuid.disabled {
    cursor: default!important;
    background: rgba(255, 255, 255, 0.08)!important;
    border-color: rgba(255, 255, 255, 0.08)!important;
    transform: none!important;
}

.config-uuid.disabled::before {
    transform: translateY(-2px)!important;
}

.config-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.config-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #a78bfa;
    transform: translateY(-2px);
}

.config-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #ec4899);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.config-btn:hover::before {
    transform: scaleX(1);
}

.config-btn.disabled {
    cursor: default!important;
    background: rgba(255, 255, 255, 0.08)!important;
    border-color: rgba(255, 255, 255, 0.08)!important;
    transform: none!important;
}

.config-btn.disabled::before {
    transform: translateY(-2px)!important;
}

.config-btn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.config-title {
    font-weight: 600;
    color: white;
    font-size: 0.78rem;
}

.config-subtitle {
    font-size: 0.75rem;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-type {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(167, 139, 250, 0.15);
    border-radius: 8px;
    color: #a78bfa;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 6px;
}

.config-icon {
    font-size: 1.2rem;
    float: right;
    margin-top: 6px;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.btn-icon {
    font-size: 16px;
}

.update-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #48c78e);
    animation: progress 2s ease-in-out infinite;
    z-index: 1001;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}
