/* Dashboard Layout */
.dashboard-container {
    display: flex;
    height: calc(100vh - 100px);
    /* Adjust based on valid header/footer if any */
    max-width: 1400px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 30px;
    /* Fallback : un arrondi plus classique */

    @supports (corner-shape: squircle) {
        border-radius: 90px;
        corner-shape: squircle;
    }

    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sidebar */
.dashboard-sidebar {
    width: 350px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.btn-add-new {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    /* Fallback */

    /* Border shape */
    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }

    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-add-new:hover {
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.character-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.character-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    /* Fallback */

    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }

    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.character-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.character-item.active {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
}

.mini-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-muted);
}

.character-item.active .mini-avatar {
    border-color: var(--primary);
}

.char-info h3 {
    margin: 0;
    font-size: 1rem;
}

.char-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Dashboard Content (Form Area) */
.dashboard-content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    position: relative;
    background: radial-gradient(circle at top right, rgba(0, 243, 255, 0.05), transparent 40%);
}

.form-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-header h2 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(45deg, #fff, var(--text-muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.edit-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.form-actions {
    grid-column: span 2;
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-save {
    background: linear-gradient(45deg, var(--primary), #00a8ff);
    color: #000;
    border: none;
    padding: 1rem 3rem;
    border-radius: 12px;
    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0, 243, 255, 0.2);
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 0px 30px rgba(0, 243, 255, 0.3);
}

/* Image Preview */
.image-preview-container {
    grid-column: span 2;
    display: flex;
    gap: 2rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 20px;
    /* Fallback */

    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }
}

.live-preview-img {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    /* Fallback */

    @supports (corner-shape: squircle) {
        border-radius: 30px;
        corner-shape: squircle;
    }

    object-fit: cover;
    background: #000;
}

/* File Input & Toggles */
.input-toggles input[type="radio"] {
    accent-color: var(--primary);
    width: 20px;
    height: 20px;
}

input[type="file"]::file-selector-button {
    margin-right: 20px;
    border: none;
    background: var(--primary);
    padding: 10px 20px;
    border-radius: 10px;
    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }
    color: #000;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease-in-out;
}

input[type="file"]::file-selector-button:hover {
    background: #00a8ff;
}

/* Delete Button */
.btn-delete {
    background: rgba(255, 0, 85, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 0, 85, 0.5);
    padding: 1rem 3rem;
    border-radius: 12px;
    @supports (corner-shape: squircle) {
        border-radius: 50px;
        corner-shape: squircle;
    }
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: rgba(255, 0, 85, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
    transform: translateY(-2px);
    color: #fff;
}