:root {
    --blue: #04449E;
    --teal: #2BF6D1;
    --dark: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background: var(--dark); color: var(--text); padding-bottom: 50px; }

.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* NAV - Atualizado para alinhar a Logo à esquerda e Botões à direita */
nav { padding: 30px 0; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 40px; }
.nav-content { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* HERO */
.hero { text-align: center; margin-bottom: 40px; }
.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -1px; }
.hero h1 span { color: var(--teal); }
.hero p { color: #94a3b8; font-size: 1.1rem; }

/* CARD ENCURTADOR */
.card-shortener {
    background: var(--card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.form-group { margin-bottom: 25px; }

label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.85rem; color: var(--teal); text-transform: uppercase; letter-spacing: 1px; }

.optional { color: #64748b; text-transform: none; font-weight: 400; }

.input-wrapper, .subdomain-box, .path-box {
    background: #0f172a;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    transition: 0.3s;
}

.input-wrapper:focus-within, .subdomain-box:focus-within, .path-box:focus-within {
    border-color: var(--blue);
}

input {
    background: transparent;
    border: none;
    padding: 16px;
    color: white;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.input-wrapper i { color: #475569; }
.host-display, .prefix { font-weight: 700; color: var(--blue); white-space: nowrap; }

.refresh-btn {
    background: none;
    border: none;
    color: var(--teal);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 10px;
    transition: 0.3s;
}

.refresh-btn:hover { transform: rotate(180deg); }

.btn-primary {
    width: 100%;
    padding: 20px;
    background: var(--teal);
    color: var(--blue);
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover { background: #1de0bd; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(43, 246, 209, 0.2); }

/* ÁREA DE RESULTADO */
.result-area { margin-top: 30px; animation: slideUp 0.5s ease; }
.hidden { display: none !important; }

.result-card { background: rgba(4, 68, 158, 0.1); border: 2px dashed var(--blue); padding: 30px; border-radius: 20px; text-align: center; }

.result-display { display: flex; gap: 10px; margin-top: 15px; }

#shortUrl { background: #0f172a; border: 1px solid var(--blue); color: var(--teal); font-weight: 700; border-radius: 8px; }

#btnCopy { background: var(--teal); color: var(--blue); border: none; padding: 0 25px; border-radius: 8px; font-weight: 800; cursor: pointer; transition: 0.3s; }
#btnCopy:hover { background: #1de0bd; }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   ESTILOS DO SISTEMA DE CONTAS E MODAIS
   ========================================= */

.auth-buttons { display: flex; align-items: center; gap: 15px; }

.btn-text { background: none; border: none; color: var(--text); font-weight: 600; cursor: pointer; font-size: 1rem; transition: 0.3s; }
.btn-text:hover { color: var(--teal); }

.btn-outline { background: transparent; border: 2px solid var(--teal); color: var(--teal); padding: 8px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-outline:hover { background: var(--teal); color: var(--blue); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1000; }

.modal-content { background: var(--card); border: 1px solid rgba(255,255,255,0.1); padding: 35px; border-radius: 20px; width: 100%; max-width: 400px; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.modal-header h2 { color: var(--teal); font-size: 1.5rem; }

.close-btn { background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; transition: 0.3s; }
.close-btn:hover { color: #ef4444; }

.modal-content form { display: flex; flex-direction: column; gap: 15px; }
.modal-content input { background: #0f172a; border: 1px solid rgba(255,255,255,0.1); padding: 15px; border-radius: 10px; color: white; font-size: 1rem; outline: none; transition: 0.3s; }
.modal-content input:focus { border-color: var(--blue); }

.modal-links { margin-top: 20px; display: flex; justify-content: space-between; font-size: 0.9rem; }
.modal-links a { color: var(--text); text-decoration: none; transition: 0.3s; }
.modal-links a:hover { color: var(--teal); }

.dashboard-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--card);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
}

.sidebar-nav { flex-grow: 1; margin-top: 40px; display: flex; flex-direction: column; gap: 10px; }
.sidebar-nav a { 
    color: var(--text-dim); 
    text-decoration: none; 
    padding: 12px 15px; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    transition: 0.3s;
}
.sidebar-nav a.active { background: var(--blue); color: white; }
.sidebar-nav a:hover:not(.active) { background: rgba(255,255,255,0.05); color: var(--teal); }
.sidebar-nav a.disabled { opacity: 0.4; cursor: not-allowed; }

.main-content { margin-left: 260px; flex-grow: 1; padding: 40px; }

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.chart-container {
    background: var(--card);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.chart-container h3 { margin-bottom: 20px; font-size: 1rem; color: var(--teal); text-transform: uppercase; }

@media (max-width: 900px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}

/* =========================================
   TABELA "MEUS LINKS" (Design Profissional)
   ========================================= */
.table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--card); /* #1e293b */
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 750px;
}

.links-table th {
    padding: 18px 20px;
    color: #94a3b8; /* Cinza suave */
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
}

.links-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #e2e8f0;
    vertical-align: middle;
}

.links-table tr:hover td {
    background: rgba(255,255,255,0.02); /* Efeito sutil ao passar o mouse na linha */
}

/* Tipografia interna da tabela */
.link-primary {
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    transition: 0.2s;
}

.link-primary:hover {
    color: var(--teal);
}

.link-subtext {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
}

.link-url-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    color: #94a3b8;
}

.badge-clicks {
    background: rgba(43, 246, 209, 0.1);
    color: var(--teal);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.95rem;
}

/* Botões de Ação Modernos (Translúcidos) */
.actions-flex {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-action {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
    font-size: 1.1rem;
}

.btn-copy { background: rgba(43, 246, 209, 0.1); color: var(--teal); }
.btn-copy:hover { background: var(--teal); color: var(--dark); transform: translateY(-2px); }

.btn-pause { background: rgba(234, 179, 8, 0.1); color: #eab308; }
.btn-pause:hover { background: #eab308; color: #fff; transform: translateY(-2px); }

.btn-play { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.btn-play:hover { background: #22c55e; color: #fff; transform: translateY(-2px); }

.btn-edit { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.btn-edit:hover { background: #3b82f6; color: #fff; transform: translateY(-2px); }

.btn-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.btn-delete:hover { background: #ef4444; color: #fff; transform: translateY(-2px); }