:root {
    --primary: #6F13F2;
    --primary-dark: #500cb8;
    --secondary: #CC1ECF;
    --action: #68F206;
    --bg: #0a0a0f;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #888;
    --font-main: 'Space Grotesk', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

/* Utilities */
.skin-glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px dashed var(--border);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--text);
}

.btn-icon {
    background: transparent;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
}

.w-100 {
    width: 100%;
}

/* Login */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
}

.login-box {
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.dot {
    color: var(--action);
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
select,
textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    color: var(--text);
    font-family: var(--font-main);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Dashboard Layout */
#app {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    margin: 10px;
    display: flex;
    flex-direction: column;
}

.brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.brand h1 {
    margin: 0;
    font-size: 24px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex: 1;
}

.nav-links li {
    padding: 15px 25px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.nav-links li:hover,
.nav-links li.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.nav-links li.active {
    border-left-color: var(--action);
}

.nav-footer {
    padding: 20px;
    text-align: center;
}

.btn-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.content {
    flex: 1;
    padding: 10px 10px 10px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.status-badge {
    font-size: 0.8rem;
    padding: 4px 8px;
    background: #333;
    border-radius: 4px;
    margin-right: 10px;
    color: #aaa;
}

.status-badge.success {
    color: var(--action);
    background: rgba(104, 242, 6, 0.1);
}

.status-badge.error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

/* Tabs */
.tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.tab-content.active {
    display: block;
}

/* Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    /* Allow rows to size to content */
    gap: 15px;
    padding-bottom: 50px;
}

.card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.card.wide {
    grid-column: span 2;
}

.card.full-height {
    height: 100%;
}

.card h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.item-list {
    flex: 1;
    margin-bottom: 15px;
}

/* Item Rows */
.item-row {
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    /* Changed to wrap to allow multi-line details */
    gap: 8px;
    align-items: center;
    border: 1px solid transparent;
    /* Prepare for border */
}

.item-row:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.input-group {
    position: relative;
}

/* Specific inputs sizing */
.inp-name {
    flex: 2;
    font-weight: bold;
}

.inp-status {
    width: 110px;
}

.inp-progress {
    width: 60px;
}

.inp-date {
    width: 130px;
}

.inp-full {
    flex: 1;
}

.inp-desc {
    flex: 3;
}

.inp-sm {
    width: 80px;
}

.inp-prob {
    width: 90px;
}

.item-details {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--action);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* JSON Editor */
#json-editor {
    width: 100%;
    height: 100%;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    border: 1px solid var(--border);
    background: #000;
}