/* ===== RESET E BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
}
a { color: #6c8cff; text-decoration: none; }
a:hover { color: #8fa6ff; }

/* ===== LOGIN ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}
.login-box {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid #2a2a4a;
}
.login-box h1 {
    text-align: center;
    margin-bottom: 5px;
    color: #fff;
    font-size: 28px;
}
.login-box .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
    font-size: 14px;
}
.login-box .form-group {
    margin-bottom: 20px;
}
.login-box label {
    display: block;
    margin-bottom: 6px;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.login-box input {
    width: 100%;
    padding: 12px 16px;
    background: #12121e;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: border 0.3s;
}
.login-box input:focus {
    outline: none;
    border-color: #6c8cff;
}
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6c8cff, #4a6fdc);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,140,255,0.4);
}
.login-box .erro {
    background: #3a1a1a;
    color: #ff6b6b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #5a2a2a;
}

/* ===== HEADER/NAV ===== */
header {
    background: #1a1a2e;
    padding: 16px 24px;
    border-bottom: 1px solid #2a2a4a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header .logo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
header .logo span { color: #6c8cff; }
header nav { display: flex; gap: 20px; align-items: center; }
header nav a {
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
header nav a:hover { color: #fff; }
header .user-info {
    color: #888;
    font-size: 13px;
}
header .user-info strong { color: #e0e0e0; }
.logout-btn {
    background: #2a2a4a;
    color: #ff6b6b !important;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
}

/* ===== DASHBOARD ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}
.page-title {
    font-size: 26px;
    margin-bottom: 8px;
    color: #fff;
}
.page-subtitle {
    color: #888;
    margin-bottom: 24px;
    font-size: 14px;
}
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
    text-align: center;
}
.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}
.stat-card .label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ===== SERVER CARDS (com LED) ===== */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.server-card {
    background: #1a1a2e;
    border-radius: 14px;
    border: 1px solid #2a2a4a;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
}
.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* LED indicator */
.server-card .led-bar {
    height: 6px;
    width: 100%;
    transition: background 0.5s;
}
.server-card .led-bar.online { background: #22c55e; }
.server-card .led-bar.lento { background: #eab308; }
.server-card .led-bar.offline { background: #ef4444; }
.server-card .led-bar.pending { background: #6366f1; }

.server-card .card-body {
    padding: 20px;
}
.server-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.server-card .card-nome {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.server-card .card-apelido {
    font-size: 13px;
    color: #6c8cff;
    margin-top: 2px;
}
.server-card .led-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    transition: all 0.5s;
    margin-top: 4px;
}
.server-card .led-dot.online { 
    background: #22c55e; 
    box-shadow: 0 0 12px rgba(34,197,94,0.5);
}
.server-card .led-dot.lento { 
    background: #eab308; 
    box-shadow: 0 0 12px rgba(234,179,8,0.5);
}
.server-card .led-dot.offline { 
    background: #ef4444; 
    box-shadow: 0 0 12px rgba(239,68,68,0.5);
}
.server-card .led-dot.pending { 
    background: #6366f1; 
    box-shadow: 0 0 12px rgba(99,102,241,0.3);
}

.server-card .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}
.server-card .info-item {
    background: #12121e;
    padding: 8px 12px;
    border-radius: 6px;
}
.server-card .info-item .label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.server-card .info-item .value {
    font-size: 13px;
    color: #ccc;
    margin-top: 2px;
}

.server-card .sites-count {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
}
.server-card .ultimo-ping {
    font-size: 11px;
    color: #555;
    margin-top: 8px;
}

/* ===== BOTÕES ===== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: #6c8cff;
    color: #fff;
}
.btn-primary:hover {
    background: #5a7aee;
    color: #fff;
}
.btn-danger {
    background: #ef4444;
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}
.btn-success {
    background: #22c55e;
    color: #fff;
}
.btn-success:hover {
    background: #16a34a;
    color: #fff;
}
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ===== TABELAS ===== */
.table-container {
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2a2a4a;
}
th {
    background: #12121e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}
td { font-size: 14px; }
tr:hover { background: #1e1e36; }

/* ===== FORMULÁRIOS ===== */
.form-card {
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
    padding: 24px;
    max-width: 700px;
    margin-bottom: 24px;
}
.form-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-group { margin-bottom: 0; }
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: #12121e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c8cff;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ===== PÁGINA DETALHE DO SERVIDOR ===== */
.servidor-header {
    background: #1a1a2e;
    border-radius: 14px;
    border: 1px solid #2a2a4a;
    padding: 28px;
    margin-bottom: 24px;
}
.servidor-header .breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}
.servidor-header .breadcrumb a { color: #6c8cff; }
.servidor-header .topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.servidor-header .topo h1 {
    font-size: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}
.servidor-header .topo .status-badge {
    font-size: 14px;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 600;
}
.servidor-header .topo .status-badge.online {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
}
.servidor-header .topo .status-badge.lento {
    background: rgba(234,179,8,0.15);
    color: #eab308;
    border: 1px solid rgba(234,179,8,0.3);
}
.servidor-header .topo .status-badge.offline {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.spec-item {
    background: #12121e;
    padding: 12px 16px;
    border-radius: 8px;
}
.spec-item .spec-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.spec-item .spec-value {
    font-size: 14px;
    color: #e0e0e0;
    margin-top: 3px;
}

/* ===== LISTA DE SISTEMAS ===== */
.sistemas-list {
    display: grid;
    gap: 12px;
}
.sistema-item {
    background: #1a1a2e;
    border-radius: 10px;
    border: 1px solid #2a2a4a;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}
.sistema-item:hover { border-color: #3a3a5a; }
.sistema-item .info h4 {
    font-size: 15px;
    color: #fff;
    margin-bottom: 3px;
}
.sistema-item .info .tipo {
    font-size: 12px;
    color: #6c8cff;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.sistema-item .info .desc {
    font-size: 13px;
    color: #888;
    margin-top: 3px;
}
.sistema-item .actions {
    display: flex;
    gap: 8px;
}

/* Tipo badges */
.tipo-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.tipo-badge.site { background: #1e3a5f; color: #60a5fa; }
.tipo-badge.servico { background: #3a1a5f; color: #c084fc; }
.tipo-badge.container { background: #1a3a2e; color: #34d399; }
.tipo-badge.api { background: #3a2e1a; color: #fbbf24; }
.tipo-badge.banco { background: #2a1a3a; color: #f472b6; }
.tipo-badge.outro { background: #2a2a3a; color: #9ca3af; }

/* ===== ACESSO RAPIDO ===== */
.acesso-rapido {
    margin-top: 24px;
    padding: 20px;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
}
.acesso-rapido h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #fff;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .servers-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    header { flex-direction: column; gap: 10px; }
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .specs-grid { grid-template-columns: 1fr 1fr; }
    .sistema-item { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ===== MENSAGENS ===== */
.msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.msg.success {
    background: rgba(34,197,94,0.1);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.2);
}
.msg.error {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
.loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2a2a4a;
    border-top: 3px solid #6c8cff;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SCROLL ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f0f1a; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a5a; }
.logo-img {
    height: 32px;
    width: 32px;
    vertical-align: middle;
    border-radius: 6px;
    margin-right: 6px;
}
.login-box .logo-icon img { width: 80px; height: 80px; border-radius: 16px; }
header .logo-img {
    height: 36px !important;
    width: 36px !important;
    border-radius: 4px;
    margin-right: 4px;
    vertical-align: middle;
}
.login-box .logo-img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 12px;
    margin-bottom: 10px;
}
