:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --success-color: #238636;
    --danger-color: #da3633;
    --input-bg: #0d1117;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.branding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branding svg {
    fill: var(--accent-color);
}

/* CARDS */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

/* FORMS */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.3);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);
}

.btn-primary {
    color: #ffffff;
    background-color: var(--success-color);
    border-color: rgba(240, 246, 252, 0.1);
}

.btn-primary:hover {
    background-color: #2ea043;
}

.btn-secondary {
    color: var(--text-primary);
    background-color: #21262d;
}

.btn-secondary:hover {
    background-color: #30363d;
}

.btn-danger {
    color: #f85149;
    background-color: transparent;
    border-color: rgba(240, 246, 252, 0.1);
}

.btn-danger:hover {
    background-color: rgba(218, 54, 51, 0.15);
    border-color: transparent;
}

.btn-edit {
    color: #d29922;
    background-color: transparent;
    border-color: rgba(210, 153, 34, 0.3);
}

.btn-edit:hover {
    background-color: rgba(210, 153, 34, 0.15);
    border-color: rgba(210, 153, 34, 0.5);
}

/* TABLE */
.sites-table {
    width: 100%;
    border-collapse: collapse;
}

.sites-table th,
.sites-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sites-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    border-radius: 2em;
    background-color: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(56, 139, 253, 0.4);
}

.status-ok {
    background-color: rgba(46, 160, 67, 0.15);
    color: #3fb950;
    border-color: rgba(46, 160, 67, 0.4);
}

.status-warning {
    background-color: rgba(187, 128, 9, 0.15);
    color: #d29922;
    border-color: rgba(187, 128, 9, 0.4);
}

/* ACTIONS */
.actions {
    display: flex;
    gap: 0.5rem;
}

/* MODAL / OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.modal {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active {
    display: flex;
}

/* UTILS */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

/* SPINNER */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: var(--accent-color);
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}