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

body {
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: #0f0f1a;
    color: #e0e0e0;
    font-size: 13px;
    height: 100vh;
    overflow: hidden;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}
.login-card {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 8px;
    width: 320px;
    text-align: center;
}
.login-card h1 { color: #7eb8f7; font-size: 16px; margin-bottom: 4px; }
.subtitle { color: #666; font-size: 11px; margin-bottom: 24px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input[type=password] {
    background: #0f0f1a;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.login-card input[type=password]:focus { border-color: #7eb8f7; }
.login-card button {
    background: #7eb8f7;
    color: #0f0f1a;
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}
.login-card button:hover { background: #a0c8f8; }
.error { color: #e74c3c; font-size: 11px; margin-bottom: 8px; }

/* 404 */
.not-found-page {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}
.not-found-card { text-align: center; }
.not-found-icon { font-size: 64px; color: #2a2a4a; margin-bottom: 16px; }
.not-found-card h1 { color: #e0e0e0; font-size: 18px; margin-bottom: 8px; }
.not-found-card .subtitle { color: #666; margin-bottom: 24px; }
.home-link { color: #7eb8f7; text-decoration: none; font-size: 12px; }
.home-link:hover { text-decoration: underline; }

/* Admin layout */
.admin-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
header {
    background: #0f0f1a;
    border-bottom: 1px solid #2a2a4a;
    padding: 0 16px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
header .brand { color: #7eb8f7; font-size: 13px; font-weight: bold; }
header a { color: #666; font-size: 11px; text-decoration: none; }
header a:hover { color: #aaa; }

.panel-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left panel */
.left-panel {
    width: 220px;
    border-right: 1px solid #2a2a4a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.left-panel-header {
    padding: 8px 12px;
    border-bottom: 1px solid #2a2a4a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.left-panel-header span { color: #666; font-size: 11px; }
.btn-new {
    background: #7eb8f7;
    color: #0f0f1a;
    border: none;
    border-radius: 3px;
    padding: 3px 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}
.btn-new:hover { background: #a0c8f8; }
.link-list { overflow-y: auto; flex: 1; }
.link-item {
    padding: 8px 12px;
    border-left: 2px solid transparent;
    cursor: pointer;
    border-bottom: 1px solid #1a1a2e;
}
.link-item:hover { background: #16213e; }
.link-item.selected {
    background: #16213e;
    border-left-color: #7eb8f7;
}
.link-item .slug { color: #7eb8f7; font-size: 12px; }
.link-item .meta { color: #555; font-size: 10px; margin-top: 2px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }
.dot.active { background: #4caf50; }
.dot.inactive { background: #ff9800; }

/* Right panel */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tabs {
    display: flex;
    border-bottom: 1px solid #2a2a4a;
    flex-shrink: 0;
}
.tab {
    padding: 8px 16px;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tab:hover { color: #aaa; }
.tab.active {
    color: #7eb8f7;
    border-bottom-color: #7eb8f7;
}
.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.tab-content.active { display: block; }

/* Form */
.form-group { margin-bottom: 14px; }
.form-label { color: #666; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; display: block; }
.form-input {
    width: 100%;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 7px 10px;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}
.form-input:focus { border-color: #7eb8f7; }
.form-select {
    width: 100%;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 7px 10px;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}
.form-actions { display: flex; gap: 8px; margin-top: 18px; }
.btn-save {
    background: #7eb8f7;
    color: #0f0f1a;
    border: none;
    border-radius: 4px;
    padding: 7px 16px;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}
.btn-save:hover { background: #a0c8f8; }
.btn-delete {
    background: #2a2a4a;
    color: #aaa;
    border: none;
    border-radius: 4px;
    padding: 7px 16px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}
.btn-delete:hover { background: #c0392b; color: #fff; }

/* Analytics */
.stat-cards { display: flex; gap: 10px; margin-bottom: 16px; }
.stat-card {
    flex: 1;
    background: #16213e;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
}
.stat-value { color: #7eb8f7; font-size: 20px; font-weight: bold; }
.stat-label { color: #555; font-size: 10px; margin-top: 2px; }

.clicks-table { width: 100%; border-collapse: collapse; }
.clicks-table th {
    color: #555;
    font-size: 10px;
    text-transform: uppercase;
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid #2a2a4a;
}
.clicks-table td {
    padding: 5px 8px;
    font-size: 11px;
    color: #aaa;
    border-bottom: 1px solid #1a1a2e;
}
.clicks-table td:first-child { color: #666; }
.clicks-table td.country { color: #7eb8f7; }

.empty-state { color: #444; font-size: 12px; padding: 40px; text-align: center; }
.form-error { color: #e74c3c; font-size: 11px; margin-top: 6px; }
