:root {
    --dd-bg: #05060a;
    --dd-bg-alt: #080a12;
    --dd-surface: #101320;
    --dd-border: #23263a;
    --dd-text: #f5f7ff;
    --dd-text-muted: #a1a5bd;
    --dd-accent: #4fd1c5;
    --dd-error: #f56565;
    --dd-radius: 16px;
    --dd-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--dd-font);
    background: radial-gradient(circle at top, #15192b 0, #05060a 50%, #020308 100%);
    color: var(--dd-text);
    line-height: 1.6;
}

/* Layout */

.dd-container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding-inline: 1.5rem;
}

.dd-section {
    padding: 3.5rem 0;
}

.dd-section-alt {
    background: radial-gradient(circle at top left, #181c2a 0, #05060a 50%, #05060a 100%);
}

/* Header */

.dd-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(5, 6, 10, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
}

.dd-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dd-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, #4fd1c5, #7f5af0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #020308;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
}

.dd-brand-text {
    display: flex;
    flex-direction: column;
}

.dd-brand-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dd-brand-subtitle {
    font-size: 0.75rem;
    color: var(--dd-text-muted);
}

.dd-header-status {
    font-size: 0.78rem;
    color: var(--dd-text-muted);
}

/* Main */

.dd-main {
    min-height: calc(100vh - 90px);
}

.dd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: flex-start;
}

.dd-col h1 {
    font-size: 1.9rem;
    margin: 0 0 0.75rem;
}

.dd-lead {
    color: var(--dd-text-muted);
    margin: 0 0 1.5rem;
    max-width: 540px;
}

.dd-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dd-list li {
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
    color: var(--dd-text-muted);
}

.dd-list strong {
    color: var(--dd-text);
}

/* Card */

.dd-card {
    background: rgba(8, 9, 16, 0.98);
    border-radius: var(--dd-radius);
    border: 1px solid var(--dd-border);
    padding: 1.1rem 1.25rem 1.25rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.dd-card h2 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.dd-card-flat {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* Form */

.dd-label {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
}

.dd-label-small {
    margin-top: 0.8rem;
    color: var(--dd-text-muted);
}

.dd-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--dd-border);
    background: #050713;
    color: var(--dd-text);
    padding: 0.6rem 0.75rem;
    font-family: var(--dd-font);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 120px;
    outline: none;
}

.dd-textarea:focus {
    border-color: rgba(79, 209, 197, 0.6);
    box-shadow: 0 0 0 1px rgba(79, 209, 197, 0.4);
}

.dd-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--dd-border);
    background: #050713;
    color: var(--dd-text);
    padding: 0.45rem 0.75rem;
    font-family: var(--dd-font);
    font-size: 0.85rem;
    outline: none;
}

.dd-input:focus {
    border-color: rgba(79, 209, 197, 0.6);
    box-shadow: 0 0 0 1px rgba(79, 209, 197, 0.3);
}

/* Button */

.dd-btn {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(79, 209, 197, 0.5);
    background: linear-gradient(135deg, #4fd1c5, #7f5af0);
    color: #020308;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.7);
}

.dd-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.dd-status {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    min-height: 1.1rem;
}

.dd-status-ok {
    color: var(--dd-accent);
}

.dd-status-error {
    color: var(--dd-error);
}

/* Recent list */

.dd-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.dd-link-button {
    font-size: 0.78rem;
    color: var(--dd-accent);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.dd-recent-list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.dd-recent-item {
    border-radius: 12px;
    border: 1px solid rgba(35, 38, 58, 0.9);
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.55rem;
    background: rgba(5, 7, 14, 0.98);
}

.dd-recent-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--dd-text-muted);
    margin-bottom: 0.3rem;
}

.dd-recent-text {
    font-size: 0.85rem;
}

.dd-recent-tags {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--dd-text-muted);
}

.dd-tag {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: rgba(79, 209, 197, 0.15);
    margin-right: 0.25rem;
}

/* Misc */

.dd-muted {
    font-size: 0.8rem;
    color: var(--dd-text-muted);
}

/* Footer */

.dd-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.9rem 0 1.2rem;
    background: #040509;
}

.dd-footer-text {
    font-size: 0.78rem;
    color: var(--dd-text-muted);
}

/* Responsive */

@media (max-width: 840px) {
    .dd-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dd-section {
        padding: 2.75rem 0;
    }
}
