/* =============================================================
   HDSuspendingSystem by V and H
   Main stylesheet - dark theme inspired by X (Twitter)
   All styles live in this single CSS file, as requested.
   Note: we use a generic rotated geometric shape as a background
   accent instead of any third-party logo/trademark.
============================================================= */

@font-face {
    /* Local "chirp-like" font stack fallback since the original
       proprietary font file is not distributable. Replace src
       with the real font file if you have a license for it. */
    font-family: 'familyTwitterChirp';
    src: local('Chirp'), local('Helvetica Neue'), local('Arial');
    font-weight: 400 700;
}

:root {
    --bg: #000000;
    --bg-panel: #16181c;
    --bg-panel-alt: #1d1f23;
    --border: #2f3336;
    --text-primary: #e7e9ea;
    --text-secondary: #71767b;
    --accent: #1d9bf0;
    --accent-hover: #1a8cd8;
    --danger: #f4212e;
    --success: #00ba7c;
    --warning: #ffd400;
    --radius: 16px;
    --sidebar-width: 240px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'familyTwitterChirp', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
}

/* Rotated geometric background accent (90deg rotated square motif) */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 900px;
    height: 900px;
    transform: translate(-50%, -50%) rotate(90deg);
    background: radial-gradient(circle at center, rgba(29,155,240,0.05) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Layout ---------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar .brand {
    font-weight: 800;
    font-size: 18px;
    line-height: 1.2;
}
.sidebar .brand-sub {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 24px;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 9999px;
    font-weight: 600;
}
.nav a:hover { background: var(--bg-panel); text-decoration: none; }
.nav a.active { color: var(--accent); }

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.current-user { font-weight: 600; }
.logout-link { color: var(--text-secondary); font-size: 13px; }

.main-content {
    flex: 1;
    padding: 24px 32px;
    max-width: 1200px;
}

/* ---------------- Login page ---------------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-box {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 340px;
}
.login-box .brand {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
}
.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-form label { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

/* ---------------- Common elements ---------------- */
h1, h2, h3 { font-weight: 800; }
h1 { font-size: 22px; margin: 0 0 20px; }
h2 { font-size: 18px; margin: 24px 0 12px; }

input, select, textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 9999px;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-secondary { background: var(--bg-panel-alt); color: var(--text-primary); border: 1px solid var(--border); }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: rgba(244,33,46,0.1); color: var(--danger); border: 1px solid var(--danger); }
.alert-success { background: rgba(0,186,124,0.1); color: var(--success); border: 1px solid var(--success); }

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
th { color: var(--text-secondary); font-weight: 600; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-active { background: rgba(0,186,124,0.15); color: var(--success); }
.badge-disabled { background: rgba(244,33,46,0.15); color: var(--danger); }
.badge-pending { background: rgba(255,212,0,0.15); color: var(--warning); }

.metric-value { font-size: 26px; font-weight: 800; }
.metric-label { color: var(--text-secondary); font-size: 13px; }

.chart-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }

.cron-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
    font-size: 13px;
    color: var(--success);
    overflow-x: auto;
    white-space: pre;
}

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--text-secondary); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
